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 D66991FF17C for ; Wed, 11 Jun 2025 08:43:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8C99838C01; Wed, 11 Jun 2025 08:44:22 +0200 (CEST) Mime-Version: 1.0 Date: Wed, 11 Jun 2025 08:43:48 +0200 Message-Id: From: "Christoph Heiss" To: "Proxmox VE development discussion" X-Mailer: aerc 0.20.1 References: <20250304120312.720783-1-c.heiss@proxmox.com> In-Reply-To: <20250304120312.720783-1-c.heiss@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.029 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH widget-toolkit v2] window: ACMEDomains: show error dialog on domain limit X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Ping, still applies. On Tue Mar 4, 2025 at 12:57 PM CET, Christoph Heiss wrote: > Currently, this just fails silently for users and only logs an error to > the console. Improve the error message & show an alert dialog on > failure. > > This affects both PMG & PBS, as they use the exact same codepath/panel. > > Originally reported in the forum: > https://forum.proxmox.com/threads/acme-max-certificate.161400/ > > Signed-off-by: Christoph Heiss > --- > Changes v1 -> v2: > * change `gettext('Error')` to `Proxmox.Utils.errorText` > > v1: https://lore.proxmox.com/pve-devel/20250129112633.1082600-1-c.heiss@proxmox.com/ > > src/window/ACMEDomains.js | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/src/window/ACMEDomains.js b/src/window/ACMEDomains.js > index 1fcc784..b1b845f 100644 > --- a/src/window/ACMEDomains.js > +++ b/src/window/ACMEDomains.js > @@ -49,13 +49,21 @@ Ext.define('Proxmox.window.ACMEDomainEdit', { > return `acmedomain${i}`; > } > } > - throw "too many domains configured"; > + throw Ext.String.format( > + gettext('Cannot create more than {0} ACME domains.'), > + Proxmox.Utils.acmedomain_count, > + ); > }; > > // If we have a 'usage' property (pmg), we only use the `acmedomainX` config keys. > if (win.separateDomainEntries || win.domainUsages) { > if (!configkey || configkey === 'acme') { > - configkey = find_free_slot(); > + try { > + configkey = find_free_slot(); > + } catch (e) { > + Ext.Msg.alert(Proxmox.Utils.errorText, e); > + throw e; > + } > } > delete values.type; > params[configkey] = Proxmox.Utils.printPropertyString(values, 'domain'); > @@ -68,7 +76,12 @@ Ext.define('Proxmox.window.ACMEDomainEdit', { > // Then insert the domain depending on its type: > if (values.type === 'dns') { > if (!olddomain.configkey || olddomain.configkey === 'acme') { > - configkey = find_free_slot(); > + try { > + configkey = find_free_slot(); > + } catch (e) { > + Ext.Msg.alert(Proxmox.Utils.errorText, e); > + throw e; > + } > if (olddomain.domain) { > // we have to remove the domain from the acme domainlist > Proxmox.Utils.remove_domain_from_acme(acmeObj, olddomain.domain); _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel