From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9F39B1FF183 for ; Wed, 5 Nov 2025 11:10:55 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EA4A6200F6; Wed, 5 Nov 2025 11:11:35 +0100 (CET) Message-ID: <6d5d9faf-765a-4241-9931-371e92848755@proxmox.com> Date: Wed, 5 Nov 2025 11:11:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Proxmox Datacenter Manager development discussion , Lukas Wagner References: <20251103123521.266258-1-l.wagner@proxmox.com> <20251103123521.266258-12-l.wagner@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20251103123521.266258-12-l.wagner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762337474238 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.029 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH datacenter-manager v2 11/12] pdm-client: resource list: add view-filter parameter X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Reviewed-by: Dominik Csapak On 11/3/25 1:36 PM, Lukas Wagner wrote: > Signed-off-by: Lukas Wagner > --- > cli/client/src/resources.rs | 2 +- > lib/pdm-client/src/lib.rs | 9 ++++++++- > ui/src/sdn/zone_tree.rs | 2 +- > 3 files changed, 10 insertions(+), 3 deletions(-) > > diff --git a/cli/client/src/resources.rs b/cli/client/src/resources.rs > index dbf9f265..bc3a98ba 100644 > --- a/cli/client/src/resources.rs > +++ b/cli/client/src/resources.rs > @@ -31,7 +31,7 @@ pub fn cli() -> CommandLineInterface { > )] > /// List all the remotes this instance is managing. > async fn get_resources(max_age: Option) -> Result<(), Error> { > - let mut resources = client()?.resources(max_age).await?; > + let mut resources = client()?.resources(max_age, None).await?; > let output_format = env().format_args.output_format; > if output_format == OutputFormat::Text { > if resources.is_empty() { > diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs > index 0cab7691..7102ee05 100644 > --- a/lib/pdm-client/src/lib.rs > +++ b/lib/pdm-client/src/lib.rs > @@ -863,9 +863,14 @@ impl PdmClient { > Ok(self.0.get(&path).await?.expect_json()?.data) > } > > - pub async fn resources(&self, max_age: Option) -> Result, Error> { > + pub async fn resources( > + &self, > + max_age: Option, > + view_filter: Option<&str>, > + ) -> Result, Error> { > let path = ApiPathBuilder::new("/api2/extjs/resources/list") > .maybe_arg("max-age", &max_age) > + .maybe_arg("view-filter", &view_filter) > .build(); > Ok(self.0.get(&path).await?.expect_json()?.data) > } > @@ -874,10 +879,12 @@ impl PdmClient { > &self, > max_age: Option, > resource_type: ResourceType, > + view_filter: Option<&str>, > ) -> Result, Error> { > let path = ApiPathBuilder::new("/api2/extjs/resources/list") > .maybe_arg("max-age", &max_age) > .arg("resource-type", resource_type) > + .maybe_arg("view-filter", &view_filter) > .build(); > > Ok(self.0.get(&path).await?.expect_json()?.data) > diff --git a/ui/src/sdn/zone_tree.rs b/ui/src/sdn/zone_tree.rs > index 1f534388..7475483d 100644 > --- a/ui/src/sdn/zone_tree.rs > +++ b/ui/src/sdn/zone_tree.rs > @@ -281,7 +281,7 @@ impl LoadableComponent for ZoneTreeComponent { > Box::pin(async move { > let client = pdm_client(); > let remote_resources = client > - .resources_by_type(None, ResourceType::PveSdnZone) > + .resources_by_type(None, ResourceType::PveSdnZone, None) > .await?; > link.send_message(Self::Message::LoadFinished(remote_resources)); > _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel