public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 2/3] ui: pve: properly name route for 'datacenter' node
Date: Mon, 15 Dec 2025 16:18:02 +0100	[thread overview]
Message-ID: <20251215151857.3420519-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20251215151857.3420519-1-d.csapak@proxmox.com>

If we don't give a proper string here, the default is '_' which looks a
bit weird in the url bar. Instead, name it 'datacenter'.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/pve/tree.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/src/pve/tree.rs b/ui/src/pve/tree.rs
index 7a55dd12..a496f930 100644
--- a/ui/src/pve/tree.rs
+++ b/ui/src/pve/tree.rs
@@ -58,7 +58,7 @@ impl ExtractPrimaryKey for PveTreeNode {
 impl PveTreeNode {
     fn get_path(&self) -> String {
         match self {
-            PveTreeNode::Root => String::new(),
+            PveTreeNode::Root => "datacenter".to_string(),
             PveTreeNode::Node(node) => format!("node+{}", node.node),
             PveTreeNode::Lxc(lxc) => format!("guest+{}", lxc.vmid),
             PveTreeNode::Qemu(qemu) => format!("guest+{}", qemu.vmid),
@@ -394,7 +394,7 @@ impl LoadableComponent for PveTreeComp {
                 }
             }
             Msg::RouteChanged(path) => {
-                let key = if path == "_" {
+                let key = if path == "_" || path == "datacenter" || path == "" {
                     Key::from("__root__")
                 } else {
                     Key::from(format!(
-- 
2.47.3



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


  parent reply	other threads:[~2025-12-15 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 15:18 [pdm-devel] [PATCH datacenter-manager 0/3] ui: pve: improve route navigation Dominik Csapak
2025-12-15 15:18 ` [pdm-devel] [PATCH datacenter-manager 1/3] ui: pve remote panels: enable router function Dominik Csapak
2025-12-15 15:18 ` Dominik Csapak [this message]
2025-12-15 15:18 ` [pdm-devel] [PATCH datacenter-manager 3/3] ui: pve tree: prevent from pushing unnecessary route Dominik Csapak
2025-12-16  9:14 ` [pdm-devel] applied: [PATCH datacenter-manager 0/3] ui: pve: improve route navigation Dietmar Maurer

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=20251215151857.3420519-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pdm-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal