[pve-devel] [PATCH manager v2 5/5] ui: silence auth failures during cluster join

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 4 14:36:47 CEST 2018


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

no changes

 www/manager6/Workspace.js      |  2 +-
 www/manager6/dc/ClusterEdit.js | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index c7b88761..f75356c5 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -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();
 	    }
 	});
diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index 5a719502..bdf1ae69 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -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
-- 
2.14.2





More information about the pve-devel mailing list