From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 275461FF066 for ; Tue, 24 Nov 2026 08:15:33 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id DF6072057E; Tue, 24 Nov 2026 08:15:32 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 24 Nov 2026 08:15:28 +0100 Message-Id: Subject: Re: [PATCH manager 2/2] ui: dc options: next-id: require upper to be above lower From: "Dominik Rusovac" To: =?utf-8?q?Michael_K=C3=B6ppl?= , X-Mailer: aerc 0.20.0 References: <20261123152100.2920205-1-m.koeppl@proxmox.com> <20261123152100.2920205-3-m.koeppl@proxmox.com> In-Reply-To: <20261123152100.2920205-3-m.koeppl@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795504528845 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: 6KDKAGMLQOI33B65VQNRORXWJGGPWNJE X-Message-ID-Hash: 6KDKAGMLQOI33B65VQNRORXWJGGPWNJE X-MailFrom: d.rusovac@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 VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: one nit inline consider as: Reviewed-by: Dominik Rusovac On Mon Nov 23, 2026 at 4:21 PM CET, Michael K=C3=B6ppl wrote: > The backend rejects a next-id range whose exclusive upper boundary is > not above the lower one. Check this in the window already, so that users > see the error at the field instead of only after submitting. > > Signed-off-by: Michael K=C3=B6ppl > --- > www/manager6/dc/OptionView.js | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.j= s > index 19e6d54e..e9e88758 100644 > --- a/www/manager6/dc/OptionView.js > +++ b/www/manager6/dc/OptionView.js > @@ -372,6 +372,10 @@ Ext.define('PVE.dc.OptionView', { > minValue: 100, > maxValue: 1000 * 1000 * 1000 - 1, > submitValue: true, > + listeners: { > + change: (field) =3D> > + field.up('inputpanel').down('field[name=3Dup= per]').validate(), > + }, > }, > { > xtype: 'proxmoxintegerfield', > @@ -381,6 +385,15 @@ Ext.define('PVE.dc.OptionView', { > minValue: 100, > maxValue: 1000 * 1000 * 1000 - 1, > submitValue: true, > + validator: function () { > + let lower =3D > + this.up('inputpanel').down('field[name=3Dlow= er]').getValue() ?? 100; > + let upper =3D this.getValue() ?? 1000 * 1000; > + if (upper <=3D lower) { > + return gettext('Must be greater than the low= er boundary'); > + } > + return true; > + }, > }, > { > xtype: 'proxmoxcheckbox', nit: to increase readability and maintainabiliy, it could make sense to use named constants for the min, max and default values as a single source of truth here but this is not a blocker