all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] ui: status: properly render icon for sdn resources
@ 2025-12-01 17:46 Stefan Hanreich
  2025-12-01 18:27 ` [pdm-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2025-12-01 17:46 UTC (permalink / raw)
  To: pdm-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-01 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-01 17:46 [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] ui: status: properly render icon for sdn resources Stefan Hanreich
2025-12-01 18:27 ` [pdm-devel] applied: " Thomas Lamprecht

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