From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] ui: only show pve remotes in sdn tree
Date: Tue, 2 Dec 2025 14:17:38 +0100 [thread overview]
Message-ID: <20251202131741.364153-3-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20251202131741.364153-1-s.hanreich@proxmox.com>
The tree view for networking resources included non-PVE remotes, which
cannot have any network resources. Use the search parameter to filter
for PVE remotes, so we only show Proxmox VE remotes here.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
ui/src/sdn/zone_tree.rs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/ui/src/sdn/zone_tree.rs b/ui/src/sdn/zone_tree.rs
index a6b082e6..7652c5bb 100644
--- a/ui/src/sdn/zone_tree.rs
+++ b/ui/src/sdn/zone_tree.rs
@@ -8,6 +8,7 @@ use yew::{html, ContextHandle, Html, Properties};
use pdm_api_types::resource::{PveNetworkResource, RemoteResources, ResourceType, SdnStatus};
use pdm_client::types::{ClusterResourceNetworkType, Resource};
+use pdm_search::{Search, SearchTerm};
use proxmox_yew_comp::{LoadableComponent, LoadableComponentContext, LoadableComponentMaster};
use pwt::props::EventSubscriber;
use pwt::widget::{ActionIcon, Button, Toolbar};
@@ -317,9 +318,19 @@ impl LoadableComponent for ZoneTreeComponent {
Box::pin(async move {
let client = pdm_client();
+
+ let search = Search::with_terms([SearchTerm::new("pve").category(Some("remote-type"))])
+ .to_string();
+
let remote_resources = client
- .resources_by_type(None, ResourceType::PveNetwork, None)
+ .resources_by_type(
+ None,
+ ResourceType::PveNetwork,
+ None,
+ Some(&search.to_string()),
+ )
.await?;
+
link.send_message(Self::Message::LoadFinished(remote_resources));
Ok(())
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-12-02 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 13:17 [pdm-devel] [PATCH proxmox-datacenter-manager 0/2] Omit non-PVE remotes from the SDN resource tree Stefan Hanreich
2025-12-02 13:17 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] client: expose search parameter Stefan Hanreich
2025-12-02 13:17 ` Stefan Hanreich [this message]
2025-12-02 15:33 ` [pdm-devel] applied: [PATCH proxmox-datacenter-manager 0/2] Omit non-PVE remotes from the SDN resource tree 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=20251202131741.364153-3-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