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 BBDBB1FF065 for ; Mon, 23 Nov 2026 16:21:20 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id AE985216B7; Mon, 23 Nov 2026 16:21:06 +0100 (CET) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH manager 2/2] ui: dc options: next-id: require upper to be above lower Date: Mon, 23 Nov 2026 16:21:00 +0100 Message-ID: <20261123152100.2920205-3-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261123152100.2920205-1-m.koeppl@proxmox.com> References: <20261123152100.2920205-1-m.koeppl@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795447262216 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.176 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: BITTZFUQCMDDKSTFZVKYG63UEHK2U5TI X-Message-ID-Hash: BITTZFUQCMDDKSTFZVKYG63UEHK2U5TI X-MailFrom: m.koeppl@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: 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öppl --- www/manager6/dc/OptionView.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js 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) => + field.up('inputpanel').down('field[name=upper]').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 = + this.up('inputpanel').down('field[name=lower]').getValue() ?? 100; + let upper = this.getValue() ?? 1000 * 1000; + if (upper <= lower) { + return gettext('Must be greater than the lower boundary'); + } + return true; + }, }, { xtype: 'proxmoxcheckbox', -- 2.47.3