certs: ui-reload: code cleanup and better gettext

there's no "GUI Server" in Proxmox projects..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-03-28 14:31:11 +02:00
parent 64d85d96b3
commit 08d092b679
2 changed files with 12 additions and 13 deletions

View File

@ -86,13 +86,12 @@ Ext.define('Proxmox.panel.Certificates', {
method: 'DELETE', method: 'DELETE',
success: function(response, opt) { success: function(response, opt) {
if (cert.reloadUid) { if (cert.reloadUid) {
let txt = Ext.getBody().mask(
gettext('GUI will be restarted with new certificates, please reload!'); gettext('API server will be restarted to use new certificates, please reload web-interface!'),
Ext.getBody().mask(txt, ['x-mask-loading']); ['pve-static-mask'],
// reload after 10 seconds automatically );
Ext.defer(function() { // try to reload after 10 seconds automatically
window.location.reload(true); Ext.defer(() => window.location.reload(true), 10000);
}, 10000);
} }
}, },
failure: function(response, opt) { failure: function(response, opt) {

View File

@ -122,12 +122,12 @@ Ext.define('Proxmox.window.CertificateUpload', {
return; return;
} }
var txt = gettext('GUI server will be restarted with new certificates, please reload!'); Ext.getBody().mask(
Ext.getBody().mask(txt, ['pve-static-mask']); gettext('API server will be restarted to use new certificates, please reload web-interface!'),
// reload after 10 seconds automatically ['pve-static-mask'],
Ext.defer(function() { );
window.location.reload(true); // try to reload after 10 seconds automatically
}, 10000); Ext.defer(() => window.location.reload(true), 10000);
}, },
items: [ items: [