public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager v2 2/4] ui: auto-installer: set a default template that users can adapt
Date: Tue, 26 May 2026 14:40:11 +0200	[thread overview]
Message-ID: <20260526124013.366392-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260526124013.366392-1-s.sterz@proxmox.com>

instead of just a placeholder that vanishes after someone types a
letter. the default template is special cased as invalid so users need
to adapt it before proceeding.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 .../remotes/auto_installer/prepared_answer_add_wizard.rs   | 2 +-
 ui/src/remotes/auto_installer/prepared_answer_form.rs      | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ui/src/remotes/auto_installer/prepared_answer_add_wizard.rs b/ui/src/remotes/auto_installer/prepared_answer_add_wizard.rs
index 6ec67d0..d099d5c 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_add_wizard.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_add_wizard.rs
@@ -55,7 +55,7 @@ impl AddAnswerWizardProperties {
             target_filter: BTreeMap::new(),
             // global options
             country: "at".to_owned(),
-            fqdn: String::new(),
+            fqdn: "{{product.product}}{{installation_nr}}.example.com".to_string(),
             use_dhcp_fqdn: false,
             keyboard: answer::KeyboardLayout::default(),
             mailto: String::new(),
diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
index 72d2856..6efa66b 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
@@ -335,6 +335,13 @@ pub fn render_network_options_form(
                 .tip(tr!(
                     "Hostname and domain to set for the target installation. Allows templating."
                 ))
+                .validate(|s: &String| {
+                    if s != "{{product.product}}{{installation_nr}}.example.com" {
+                        Ok(())
+                    } else {
+                        Err(anyhow!("Please adapt the default FQDN template!"))
+                    }
+                })
                 .required(!use_dhcp_fqdn),
         )
         .with_right_field("", DisplayField::new().key("dummy"))
-- 
2.47.3





  parent reply	other threads:[~2026-05-26 12:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 12:40 [PATCH datacenter-manager v2 0/4] ui & ux improvements for the auto installer Shannon Sterz
2026-05-26 12:40 ` [PATCH datacenter-manager v2 1/4] ui: auto-installer: use empty string as default fqdn Shannon Sterz
2026-05-26 12:40 ` Shannon Sterz [this message]
2026-05-26 12:40 ` [PATCH datacenter-manager v2 3/4] ui: auto-installer: make the fqdn field a large field Shannon Sterz
2026-05-26 12:40 ` [PATCH datacenter-manager v2 4/4] ui: auto-installer: auto select filter for keyboard layout and language Shannon Sterz
2026-05-26 13:19 ` [PATCH datacenter-manager v2 0/4] ui & ux improvements for the auto installer Lukas Wagner
2026-05-26 13:47 ` 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=20260526124013.366392-3-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal