all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH proxmox-datacenter-manager 0/2] Omit non-PVE remotes from the SDN resource tree.
@ 2025-12-02 13:17 Stefan Hanreich
  2025-12-02 13:17 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] client: expose search parameter Stefan Hanreich
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-12-02 13:17 UTC (permalink / raw)
  To: pdm-devel

The SDN tree showed PBS remotes in its listing, but they cannot contain any
network resources. Filter them out by using the already provided search
functionality.

It might even make sense to remove the resources_by_type endpoint altogether and
solely use the provided search functionality - since the tree is the only
consumer of the API endpoint atm and with the introduction of the search
functionality such a dedicated endpoint might not make any sense anymore?

proxmox-datacenter-manager:

Stefan Hanreich (2):
  client: expose search parameter
  ui: only show pve remotes in sdn tree

 lib/pdm-client/src/lib.rs |  2 ++
 ui/src/sdn/zone_tree.rs   | 13 ++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)


Summary over all repositories:
  2 files changed, 14 insertions(+), 1 deletions(-)

-- 
Generated by git-murpp 0.8.0

_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

* [pdm-devel] [PATCH proxmox-datacenter-manager 1/2] client: expose search parameter
  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 ` Stefan Hanreich
  2025-12-02 13:17 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] ui: only show pve remotes in sdn tree Stefan Hanreich
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-12-02 13:17 UTC (permalink / raw)
  To: pdm-devel

This parameter already exists in the respective API endpoint, but it
doesn't get exposed via the client. Expose the search parameter here
so it can be used by the UI.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 lib/pdm-client/src/lib.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs
index 84d8b4cf..01ee6f78 100644
--- a/lib/pdm-client/src/lib.rs
+++ b/lib/pdm-client/src/lib.rs
@@ -1048,11 +1048,13 @@ impl<T: HttpApiClient> PdmClient<T> {
         max_age: Option<u64>,
         resource_type: ResourceType,
         view: Option<&str>,
+        search: Option<&str>,
     ) -> Result<Vec<RemoteResources>, Error> {
         let path = ApiPathBuilder::new("/api2/extjs/resources/list")
             .maybe_arg("max-age", &max_age)
             .arg("resource-type", resource_type)
             .maybe_arg("view", &view)
+            .maybe_arg("search", &search)
             .build();
 
         Ok(self.0.get(&path).await?.expect_json()?.data)
-- 
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] 4+ messages in thread

* [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] ui: only show pve remotes in sdn tree
  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
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hanreich @ 2025-12-02 13:17 UTC (permalink / raw)
  To: pdm-devel

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


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

* [pdm-devel] applied: [PATCH proxmox-datacenter-manager 0/2] Omit non-PVE remotes from the SDN resource tree.
  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 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] ui: only show pve remotes in sdn tree Stefan Hanreich
@ 2025-12-02 15:33 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-12-02 15:33 UTC (permalink / raw)
  To: pdm-devel, Stefan Hanreich

On Tue, 02 Dec 2025 14:17:36 +0100, Stefan Hanreich wrote:
> The SDN tree showed PBS remotes in its listing, but they cannot contain any
> network resources. Filter them out by using the already provided search
> functionality.
> 
> It might even make sense to remove the resources_by_type endpoint altogether and
> solely use the provided search functionality - since the tree is the only
> consumer of the API endpoint atm and with the introduction of the search
> functionality such a dedicated endpoint might not make any sense anymore?
> 
> [...]

Applied, thanks!

[1/2] client: expose search parameter
      commit: 1661d5f5c660993e370d35c5ac9d88b37ce997f4
[2/2] ui: only show pve remotes in sdn tree
      commit: 2fc45faa0f0a80266470dcb730b4ccf4f827c765


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


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

end of thread, other threads:[~2025-12-02 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/2] ui: only show pve remotes in sdn tree Stefan Hanreich
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

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