[pve-devel] [PATCH manager] show connection failure during login

Oguz Bektas o.bektas at proxmox.com
Wed Jul 24 16:53:46 CEST 2019


in case pvedaemon is not running or we somehow get a 595 response (connection
failure), we want to tell this to the user, since "Login failed" doesn't
help.

handle all connection failures, leave the rest the same.
we could go into more detail (CONNECT_FAILURE, CLIENT_INVALID,
LOAD_FAILURE and SERVER_INVALID), but i didn't see any reason to make
all these distinctions now.

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---

thanks dietmar for noticing and dominik for helping me debug :)

 www/manager6/window/LoginWindow.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
index 0f7ae345..7f509bb4 100644
--- a/www/manager6/window/LoginWindow.js
+++ b/www/manager6/window/LoginWindow.js
@@ -63,9 +63,15 @@ Ext.define('PVE.window.LoginWindow', {
 		uf.focus(true, true);
 	    };
 
+	    if (resp.failureType === "connect") {
+		Ext.MessageBox.alert(gettext('Error'),
+				     gettext('Connection failure.'),
+				     handler);
+	    } else {
 	    Ext.MessageBox.alert(gettext('Error'),
 				 gettext("Login failed. Please try again"),
 				 handler);
+	    }
 	},
 	success: function(data) {
 	    var me = this;
-- 
2.20.1




More information about the pve-devel mailing list