From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 6/6] ui: auto-installer: use info from answer to format preparation command
Date: Wed, 27 May 2026 14:52:17 +0200 [thread overview]
Message-ID: <20260527125217.260760-7-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260527125217.260760-1-s.sterz@proxmox.com>
previously we always used the current origin and the nodes current
certificate to format the command for iso preparation. since users can
override them and we have that info when creating a new answer, use
that instead there.
the preparation command when adding or regenerating tokens is
unaffected.
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
.../auto_installer/prepared_answer_form.rs | 5 ++++-
.../auto_installer/prepared_answers_panel.rs | 15 ++++++++++++++-
ui/src/remotes/auto_installer/token_panel.rs | 1 +
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
index 46867a2..d1b6a62 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
@@ -972,6 +972,7 @@ pub fn render_auth_form(
pub fn render_show_secret_dialog(
config_id: Option<&str>,
+ answer_base_url: Option<&str>,
token: &AnswerToken,
secret: &str,
fingerprint: &Option<String>,
@@ -1008,7 +1009,9 @@ pub fn render_show_secret_dialog(
let answer_url = format!(
"{}/api2/json/auto-install/answer",
- pdm_origin().unwrap_or_else(|| "https://pdm.example.com:8443".to_owned())
+ answer_base_url
+ .or(pdm_origin().as_deref())
+ .unwrap_or_else(|| "https://pdm.example.com:8443")
);
let mut commandline = format!(
diff --git a/ui/src/remotes/auto_installer/prepared_answers_panel.rs b/ui/src/remotes/auto_installer/prepared_answers_panel.rs
index a55c029..1850bb6 100644
--- a/ui/src/remotes/auto_installer/prepared_answers_panel.rs
+++ b/ui/src/remotes/auto_installer/prepared_answers_panel.rs
@@ -52,6 +52,8 @@ enum ViewState {
Edit,
DisplaySecret {
config_id: String,
+ url: Option<String>,
+ fingerprint: Option<String>,
token: AnswerToken,
secret: String,
},
@@ -63,6 +65,8 @@ enum Message {
RemoveEntry,
DisplaySecret {
config_id: String,
+ url: Option<String>,
+ fingerprint: Option<String>,
token: AnswerToken,
secret: String,
},
@@ -152,11 +156,15 @@ impl LoadableComponent for PreparedAnswersPanelComponent {
}
Message::DisplaySecret {
config_id,
+ url,
+ fingerprint,
token,
secret,
} => {
link.change_view(Some(Self::ViewState::DisplaySecret {
config_id,
+ url,
+ fingerprint,
token,
secret,
}));
@@ -224,6 +232,8 @@ impl LoadableComponent for PreparedAnswersPanelComponent {
if let Some(token) = new_token {
Self::Message::DisplaySecret {
config_id: config.id,
+ url: config.post_hook_base_url,
+ fingerprint: config.post_hook_cert_fp,
token: token.token,
secret: token.secret,
}
@@ -275,13 +285,16 @@ impl LoadableComponent for PreparedAnswersPanelComponent {
}
Self::ViewState::DisplaySecret {
config_id,
+ url,
+ fingerprint,
token,
secret,
} => render_show_secret_dialog(
Some(config_id),
+ url.as_deref(),
token,
secret,
- &self.fingerprint,
+ fingerprint,
on_close,
),
}
diff --git a/ui/src/remotes/auto_installer/token_panel.rs b/ui/src/remotes/auto_installer/token_panel.rs
index d5f1ff7..6744149 100644
--- a/ui/src/remotes/auto_installer/token_panel.rs
+++ b/ui/src/remotes/auto_installer/token_panel.rs
@@ -224,6 +224,7 @@ impl LoadableComponent for AuthTokenPanelComponent {
Self::ViewState::Create => self.create_add_dialog(ctx),
Self::ViewState::Edit => self.create_edit_dialog(ctx),
Self::ViewState::DisplaySecret { token, secret } => render_show_secret_dialog(
+ None,
None,
token,
secret,
--
2.47.3
next prev parent reply other threads:[~2026-05-27 12:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 12:52 [PATCH datacenter-manager 0/6] improve handling of base url and certificate fingerprint for auto-installer gui Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 1/6] server: api: certificates: allow anybody to query the certificate info Shannon Sterz
2026-05-27 14:12 ` Filip Schauer
2026-05-27 14:16 ` Lukas Wagner
2026-05-27 14:17 ` Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 2/6] pdm-client: add function to query the PDM hosts " Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 3/6] ui: remotes: auto-installer: set pdm_origin() as placeholder not tip Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 4/6] ui: remotes: auto-installer: use pdm_origin() to set initial pdm url Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 5/6] ui: auto-installer: load fingerprint and use it as initial value Shannon Sterz
2026-05-27 12:52 ` Shannon Sterz [this message]
2026-05-27 13:11 ` [PATCH datacenter-manager 0/6] improve handling of base url and certificate fingerprint for auto-installer gui Lukas Wagner
2026-05-27 14:02 ` applied: " 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=20260527125217.260760-7-s.sterz@proxmox.com \
--to=s.sterz@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