From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] ui: dashboard: sdn: show unknown zones too if they exist
Date: Thu, 11 Sep 2025 11:58:09 +0200 [thread overview]
Message-ID: <20250911095814.1769409-1-d.csapak@proxmox.com> (raw)
by adding the row but filtering it out when count is 0, similar to how
we do it in the guest panel.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/src/dashboard/sdn_zone_panel.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/src/dashboard/sdn_zone_panel.rs b/ui/src/dashboard/sdn_zone_panel.rs
index bcac36b..0e26fa9 100644
--- a/ui/src/dashboard/sdn_zone_panel.rs
+++ b/ui/src/dashboard/sdn_zone_panel.rs
@@ -87,6 +87,7 @@ impl yew::Component for SdnZonePanelComponent {
let data = vec![
StatusRow::State(SdnStatus::Available, status.available),
StatusRow::State(SdnStatus::Error, status.error),
+ StatusRow::State(SdnStatus::Unknown, status.unknown),
StatusRow::All(status.available + status.error + status.unknown),
];
@@ -111,6 +112,7 @@ fn create_list_tile(
status_row: StatusRow,
) -> Option<ListTile> {
let (icon, status, count) = match status_row {
+ StatusRow::State(SdnStatus::Unknown, 0) => return None,
StatusRow::State(sdn_status, count) => (status_row.icon(), Some(sdn_status), count),
StatusRow::All(count) => (status_row.icon(), None, count),
};
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
reply other threads:[~2025-09-11 9:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250911095814.1769409-1-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