]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
certs: ui-reload: code cleanup and better gettext
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 28 Mar 2021 12:31:11 +0000 (14:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 28 Mar 2021 12:31:13 +0000 (14:31 +0200)
there's no "GUI Server" in Proxmox projects..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/panel/Certificates.js
src/window/Certificates.js

index 332a189fcf6c2877a7405c3afa2917f0f7ca1f34..f3358f62f30b9286f1f0a6c1971db20ce355ea5c 100644 (file)
@@ -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) {
index df6dae32b29f04162765cbf83f93ee6a4c7a87ec..376dff1e3e5a12507b7ce6a44461dac6059e7e8e 100644 (file)
@@ -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: [