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

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 24 18:40:48 CEST 2019


On 7/24/19 5:46 PM, Oguz Bektas wrote:
> in case pvedaemon is not running or we somehow else 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>
> ---
> v1->v2:
> * implement thomas' suggestion of using variable for text
> 
>  www/manager6/window/LoginWindow.js | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/www/manager6/window/LoginWindow.js b/www/manager6/window/LoginWindow.js
> index 0f7ae345..0e742c74 100644
> --- a/www/manager6/window/LoginWindow.js
> +++ b/www/manager6/window/LoginWindow.js
> @@ -63,9 +63,13 @@ Ext.define('PVE.window.LoginWindow', {
>  		uf.focus(true, true);
>  	    };
>  
> -	    Ext.MessageBox.alert(gettext('Error'),
> -				 gettext("Login failed. Please try again"),
> -				 handler);
> +	    let emsg = gettext("Login failed. Please try again");
> +
> +	    if (resp.failureType === "connect") {
> +		emsg = gettext("Connection failure");
> +	    }
> +
> +	    Ext.MessageBox.alert(gettext('Error'), emsg, handler);
>  	},
>  	success: function(data) {
>  	    var me = this;
> 

applied thanks, added "Network error or Proxmox VE services not running?"
as additional hint what they issue could be.




More information about the pve-devel mailing list