all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: reset UI state on automatic logout
Date: Tue, 13 Jan 2026 13:01:06 +0100	[thread overview]
Message-ID: <20260113120132.2560888-1-d.csapak@proxmox.com> (raw)

when clicking the 'Logout' button, the UI state resets such that the
resource tree gets cleared out, the ClusterName is deleted and the
current panel gets removed.

In contrast, when automatically logged out (e.g. the ticket was
invalid), we only showed the login mask over the current state.

To make it more consistent, also reset the state when automatically
logged out. This fixes showing (possibly sensitive) data when the user
is actually logged out.

Since the navigation state is saved in the fragment, when the user logs
in again, the last used panel is automatically loaded again.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/Workspace.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index ce7ea21f..3d3b5f62 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -55,6 +55,11 @@ Ext.define('PVE.Workspace', {
         }
         me.onLogin(null);
         me.login.show();
+
+        // reset ui state
+        PVE.ClusterName = undefined;
+        me.down('pveResourceTree')?.clearTree();
+        me.setContent(null);
     },
 
     initComponent: function () {
@@ -450,10 +455,6 @@ Ext.define('PVE.StdWorkspace', {
                                     handler: function () {
                                         PVE.data.ResourceStore.loadData([], false);
                                         me.showLogin();
-                                        me.setContent(null);
-                                        var rt = me.down('pveResourceTree');
-                                        PVE.ClusterName = undefined;
-                                        rt.clearTree();
 
                                         // empty the stores of the StatusPanel child items
                                         var statusPanels =
-- 
2.47.3



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


             reply	other threads:[~2026-01-13 12:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13 12:01 Dominik Csapak [this message]
2026-01-13 18:20 ` Thomas Lamprecht

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=20260113120132.2560888-1-d.csapak@proxmox.com \
    --to=d.csapak@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