From: "Dominik Rusovac" <d.rusovac@proxmox.com>
To: "Michael Köppl" <m.koeppl@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager 2/2] ui: dc options: next-id: require upper to be above lower
Date: Tue, 24 Nov 2026 08:15:28 +0100 [thread overview]
Message-ID: <DN398HEPPWZ2.13A9AJZ0SILL5@proxmox.com> (raw)
In-Reply-To: <20261123152100.2920205-3-m.koeppl@proxmox.com>
one nit inline
consider as:
Reviewed-by: Dominik Rusovac <d.rusovac@proxmox.com>
On Mon Nov 23, 2026 at 4:21 PM CET, Michael Köppl 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öppl <m.koeppl@proxmox.com>
> ---
> 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',
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
next prev parent reply other threads:[~2026-11-24 7:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 15:20 [PATCH cluster/manager 0/2] datacenter config: next-id: reject an empty range Michael Köppl
2026-11-23 15:20 ` [PATCH cluster 1/2] " Michael Köppl
2026-11-24 6:44 ` Dominik Rusovac
2026-11-23 15:21 ` [PATCH manager 2/2] ui: dc options: next-id: require upper to be above lower Michael Köppl
2026-11-24 7:15 ` Dominik Rusovac [this message]
2026-11-24 7:41 ` [PATCH cluster/manager 0/2] datacenter config: next-id: reject an empty range Dominik Rusovac
2026-11-24 9:47 ` 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=DN398HEPPWZ2.13A9AJZ0SILL5@proxmox.com \
--to=d.rusovac@proxmox.com \
--cc=m.koeppl@proxmox.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