From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] ui: status: properly render icon for sdn resources
Date: Mon, 1 Dec 2025 18:46:11 +0100 [thread overview]
Message-ID: <20251201174612.55112-1-s.hanreich@proxmox.com> (raw)
With the addition of fabrics, there are now several distinct types of
network resources. With this patch, the search result grid now renders
the correct icon for network resources, instead of showing the zone
icon for every networking resource.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
ui/src/pve/utils.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/src/pve/utils.rs b/ui/src/pve/utils.rs
index 547dab9..a52689e 100644
--- a/ui/src/pve/utils.rs
+++ b/ui/src/pve/utils.rs
@@ -91,9 +91,9 @@ pub fn render_node_status_icon(node: &PveNodeResource) -> Container {
/// Renders the status icon for a PveSdnZone
pub fn render_sdn_status_icon(network: &PveNetworkResource) -> Container {
- let sdn_status = match network {
- PveNetworkResource::Zone(zone) => zone.status(),
- PveNetworkResource::Fabric(fabric) => fabric.status(),
+ let (sdn_status, icon) = match network {
+ PveNetworkResource::Zone(zone) => (zone.status(), "th"),
+ PveNetworkResource::Fabric(fabric) => (fabric.status(), "road"),
};
let extra = match sdn_status {
@@ -104,7 +104,7 @@ pub fn render_sdn_status_icon(network: &PveNetworkResource) -> Container {
Container::new()
.class("pdm-type-icon")
- .with_child(Fa::new("th").fixed_width())
+ .with_child(Fa::new(icon).fixed_width())
.with_child(Fa::from(extra).fixed_width().class("status-icon"))
}
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next reply other threads:[~2025-12-01 17:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 17:46 Stefan Hanreich [this message]
2025-12-01 18:27 ` [pdm-devel] applied: " 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=20251201174612.55112-1-s.hanreich@proxmox.com \
--to=s.hanreich@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