public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Michal Fox <me@dualfroz.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 1/2] fix #4588: ui: acme: allow setting the alias of DNS domains
Date: Sun,  4 Oct 2026 11:58:08 +0000	[thread overview]
Message-ID: <20261004115809.7-2-me@dualfroz.com> (raw)
In-Reply-To: <20261004115809.7-1-me@dualfroz.com>

Domains validated with the DNS challenge can have an alias, so that the
challenge record is created on another domain, which the
'_acme-challenge' record of the domain points to with a CNAME. This is
useful if the DNS plugin should not be able to update the zone of the
domain itself.

But the alias could only be set on the CLI, as the edit window only
kept an existing one in a hidden field. Show it as a text field for
domains with the DNS challenge type, like the plugin.

Signed-off-by: Michal Fox <me@dualfroz.com>
---
Tested in the browser with the domain edit window: the field is only
shown for DNS domains, an existing alias gets loaded, a cleared alias
is removed from the property string, and none is submitted for HTTP
domains.

 www/manager6/node/ACME.js | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/www/manager6/node/ACME.js b/www/manager6/node/ACME.js
index 773d0d29..7194fd01 100644
--- a/www/manager6/node/ACME.js
+++ b/www/manager6/node/ACME.js
@@ -332,16 +332,14 @@ Ext.define('PVE.node.ACMEDomainEdit', {
                         change: function (cb, value) {
                             let me = this;
                             let view = me.up('pveACMEDomainEdit');
-                            let pluginField = view.down('field[name=plugin]');
-                            pluginField.setDisabled(value !== 'dns');
-                            pluginField.setHidden(value !== 'dns');
+                            for (const name of ['plugin', 'alias']) {
+                                let field = view.down(`field[name=${name}]`);
+                                field.setDisabled(value !== 'dns');
+                                field.setHidden(value !== 'dns');
+                            }
                         },
                     },
                 },
-                {
-                    xtype: 'hidden',
-                    name: 'alias',
-                },
                 {
                     xtype: 'pveACMEPluginSelector',
                     name: 'plugin',
@@ -357,6 +355,14 @@ Ext.define('PVE.node.ACMEDomainEdit', {
                     value: '',
                     fieldLabel: gettext('Domain'),
                 },
+                {
+                    xtype: 'proxmoxtextfield',
+                    name: 'alias',
+                    disabled: true,
+                    hidden: true,
+                    fieldLabel: gettext('Alias'),
+                    emptyText: Proxmox.Utils.noneText,
+                },
             ],
         },
     ],
-- 
2.43.0




  reply	other threads:[~2026-10-04 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-04 11:58 [PATCH manager/widget-toolkit 0/2] fix #4588: acme: allow setting the alias of DNS domains Michal Fox
2026-10-04 11:58 ` Michal Fox [this message]
2026-10-04 11:58 ` [PATCH widget-toolkit 2/2] acme: domain edit: " Michal Fox

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=20261004115809.7-2-me@dualfroz.com \
    --to=me@dualfroz.com \
    --cc=pve-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