From 08d092b67904da158c3da3e5f6793f606b77e78e Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sun, 28 Mar 2021 14:31:11 +0200 Subject: [PATCH] certs: ui-reload: code cleanup and better gettext there's no "GUI Server" in Proxmox projects.. Signed-off-by: Thomas Lamprecht --- src/panel/Certificates.js | 13 ++++++------- src/window/Certificates.js | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/panel/Certificates.js b/src/panel/Certificates.js index 332a189..f3358f6 100644 --- a/src/panel/Certificates.js +++ b/src/panel/Certificates.js @@ -86,13 +86,12 @@ Ext.define('Proxmox.panel.Certificates', { method: 'DELETE', success: function(response, opt) { if (cert.reloadUid) { - let txt = - gettext('GUI will be restarted with new certificates, please reload!'); - Ext.getBody().mask(txt, ['x-mask-loading']); - // reload after 10 seconds automatically - Ext.defer(function() { - window.location.reload(true); - }, 10000); + Ext.getBody().mask( + gettext('API server will be restarted to use new certificates, please reload web-interface!'), + ['pve-static-mask'], + ); + // try to reload after 10 seconds automatically + Ext.defer(() => window.location.reload(true), 10000); } }, failure: function(response, opt) { diff --git a/src/window/Certificates.js b/src/window/Certificates.js index df6dae3..376dff1 100644 --- a/src/window/Certificates.js +++ b/src/window/Certificates.js @@ -122,12 +122,12 @@ Ext.define('Proxmox.window.CertificateUpload', { return; } - var txt = gettext('GUI server will be restarted with new certificates, please reload!'); - Ext.getBody().mask(txt, ['pve-static-mask']); - // reload after 10 seconds automatically - Ext.defer(function() { - window.location.reload(true); - }, 10000); + Ext.getBody().mask( + gettext('API server will be restarted to use new certificates, please reload web-interface!'), + ['pve-static-mask'], + ); + // try to reload after 10 seconds automatically + Ext.defer(() => window.location.reload(true), 10000); }, items: [ -- 2.39.5