all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] fix #4663: Prevent Web UI reload on cert order for other node
Date: Wed, 16 Aug 2023 10:25:14 +0200	[thread overview]
Message-ID: <20230816082514.15425-1-f.schauer@proxmox.com> (raw)

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.schauer@proxmox.com>
---
This change has been tested by ordering a valid Let's Encrypt
certificate for another node. This was done by temporarily exposing port
80 of the node through a Cloudflare Tunnel. The results indicated that
there was no need to reload the current panel.

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

diff --git a/www/manager6/node/ACME.js b/www/manager6/node/ACME.js
index 0642e7c5..122487c1 100644
--- a/www/manager6/node/ACME.js
+++ b/www/manager6/node/ACME.js
@@ -523,6 +523,8 @@ 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





             reply	other threads:[~2023-08-16  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16  8:25 Filip Schauer [this message]
2023-08-16  9:45 ` Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230816082514.15425-1-f.schauer@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal