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 DC0E51FF139 for ; Tue, 24 Feb 2026 10:58:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 05E322CFF; Tue, 24 Feb 2026 10:59:53 +0100 (CET) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager v2 7/7] ui: widgets: remote realm selector: support PBS remotes Date: Tue, 24 Feb 2026 10:59:13 +0100 Message-ID: <20260224095913.73320-8-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260224095913.73320-1-l.wagner@proxmox.com> References: <20260224095913.73320-1-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1771927141337 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.040 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 Message-ID-Hash: ECFOXPJPERLZKCM4K4E4XE6SVZCYOUAE X-Message-ID-Hash: ECFOXPJPERLZKCM4K4E4XE6SVZCYOUAE X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This is achieved by adding a new 'remote_type' property. Signed-off-by: Lukas Wagner Reviewed-by: Shan Shaji Tested-by: Shan Shaji --- 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 b3a000c3..b68ca62e 100644 --- a/ui/src/remotes/wizard_page_info.rs +++ b/ui/src/remotes/wizard_page_info.rs @@ -329,7 +329,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