From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1C31F1FF178 for ; Mon, 29 Dec 2025 14:44:23 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 237A31B4B8; Mon, 29 Dec 2025 14:45:29 +0100 (CET) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Date: Mon, 29 Dec 2025 14:44:45 +0100 Message-ID: <20251229134445.286401-8-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251229134445.286401-1-l.wagner@proxmox.com> References: <20251229134445.286401-1-l.wagner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1767015869118 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.038 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: [pdm-devel] [PATCH datacenter-manager 7/7] ui: widgets: remote realm selector: support PBS remotes 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" This is achieved by adding a new 'remote_type' property. Signed-off-by: Lukas Wagner --- ui/src/remotes/wizard_page_info.rs | 2 +- ui/src/widget/remote_realm_selector.rs | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ui/src/remotes/wizard_page_info.rs b/ui/src/remotes/wizard_page_info.rs index 8a115b4a..fc9bfb01 100644 --- a/ui/src/remotes/wizard_page_info.rs +++ b/ui/src/remotes/wizard_page_info.rs @@ -331,7 +331,7 @@ impl Component for PdmWizardPageInfo { ) .with_field( tr!("Realm"), - RemoteRealmSelector::new(hostname, fingerprint) + RemoteRealmSelector::new(hostname, fingerprint, props.remote_type) .name("realm") .disabled(!self.user_mode) .required(self.user_mode), diff --git a/ui/src/widget/remote_realm_selector.rs b/ui/src/widget/remote_realm_selector.rs index 7ba8c633..3de95568 100644 --- a/ui/src/widget/remote_realm_selector.rs +++ b/ui/src/widget/remote_realm_selector.rs @@ -16,6 +16,8 @@ use proxmox_yew_comp::percent_encoding::percent_encode_component; use pwt::props::{FieldBuilder, WidgetBuilder}; use pwt_macros::{builder, widget}; +use pdm_api_types::remotes::RemoteType; + #[widget(comp=RemoteRealmSelectorComp, @input)] #[derive(Clone, Properties, PartialEq)] #[builder] @@ -30,6 +32,9 @@ pub struct RemoteRealmSelector { /// Optional fingerprint of the remote. pub fingerprint: Option, + + /// Type of the remote. + pub remote_type: RemoteType, } impl RemoteRealmSelector { @@ -37,10 +42,12 @@ impl RemoteRealmSelector { pub fn new( hostname: impl IntoPropValue, fingerprint: impl IntoPropValue>, + remote_type: RemoteType, ) -> Self { yew::props!(Self { hostname: hostname.into_prop_value(), fingerprint: fingerprint.into_prop_value(), + remote_type, }) } } @@ -89,7 +96,8 @@ impl Component for RemoteRealmSelectorComp { let props = ctx.props(); let mut url = format!( - "/pve/realms?hostname={}", + "/{}/realms?hostname={}", + props.remote_type, percent_encode_component(&props.hostname) ); if let Some(fp) = &props.fingerprint { -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel