While it makes sense to reload the Web UI after ordering a certificate
for the same node, it is unnecessary to reload the Web UI when ordering
a certificate for a different node.

Signed-off-by: Filip Schauer <f.scha...@proxmox.com>
---
Changes since v1:
* Format the code to adhere to the style guide

 www/manager6/node/ACME.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/node/ACME.js b/www/manager6/node/ACME.js
index 0642e7c5..9f1dabce 100644
--- a/www/manager6/node/ACME.js
+++ b/www/manager6/node/ACME.js
@@ -523,6 +523,10 @@ Ext.define('PVE.node.ACME', {
 
        orderFinished: function(success) {
            if (!success) return;
+           // reload only if the Web UI is open on the same node that the cert 
was ordered for
+           if (this.getView().nodename !== Proxmox.NodeName) {
+               return;
+           }
            var txt = gettext('pveproxy will be restarted with new 
certificates, please reload the GUI!');
            Ext.getBody().mask(txt, ['pve-static-mask']);
            // reload after 10 seconds automatically
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to