ui: silence auth failures during cluster join

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2018-04-04 14:36:47 +02:00 committed by Dietmar Maurer
parent 17ec86d615
commit 370e6d327f
2 changed files with 13 additions and 1 deletions

View File

@ -60,7 +60,7 @@ Ext.define('PVE.Workspace', {
// fixme: what about other errors
Ext.Ajax.on('requestexception', function(conn, response, options) {
if (response.status == 401) { // auth failure
if (response.status == 401 && !PVE.Utils.silenceAuthFailures) { // auth failure
me.showLogin();
}
});

View File

@ -140,6 +140,11 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
controller: {
xclass: 'Ext.app.ViewController',
control: {
'#': {
close: function() {
delete PVE.Utils.silenceAuthFailures;
}
},
'proxmoxcheckbox[name=assistedInput]': {
change: 'onInputTypeChange'
},
@ -197,7 +202,14 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
}
},
submit: function() {
// joining may produce temporarily auth failures, ignore as long the task runs
PVE.Utils.silenceAuthFailures = true;
this.callParent();
},
taskDone: function(success) {
delete PVE.Utils.silenceAuthFailures;
if (success) {
var txt = gettext('Cluster join task finished, node certificate may have changed, reload GUI!');
// ensure user cannot do harm