From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C32361FF178 for ; Mon, 15 Dec 2025 16:18:14 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B82D2106AC; Mon, 15 Dec 2025 16:18:59 +0100 (CET) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Date: Mon, 15 Dec 2025 16:18:02 +0100 Message-ID: <20251215151857.3420519-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251215151857.3420519-1-d.csapak@proxmox.com> References: <20251215151857.3420519-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.031 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager 2/3] ui: pve: properly name route for 'datacenter' node X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" 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 --- 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