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 704BC1FF13F for ; Thu, 09 Apr 2026 13:42:26 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 15259B76; Thu, 9 Apr 2026 13:42:39 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Subject: [PATCH manager 05/18] ui: form/CRSOptions: allow auto rebalancing only for static and dynamic mode Date: Thu, 9 Apr 2026 13:41:31 +0200 Message-ID: <20260409114224.323102-6-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260409114224.323102-1-d.kral@proxmox.com> References: <20260409114224.323102-1-d.kral@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1775734879679 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.082 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 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: CC5D2MZFW5FZZ6EUTTEXEB7D4IDCJFB4 X-Message-ID-Hash: CC5D2MZFW5FZZ6EUTTEXEB7D4IDCJFB4 X-MailFrom: d.kral@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 HA auto rebalancing system can only be used with the static and dynamic load usage information, so constrain the web interface accordingly. Signed-off-by: Daniel Kral --- www/manager6/form/CRSOptions.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/www/manager6/form/CRSOptions.js b/www/manager6/form/CRSOptions.js index 3f3b4fea..3b539fda 100644 --- a/www/manager6/form/CRSOptions.js +++ b/www/manager6/form/CRSOptions.js @@ -19,10 +19,14 @@ Ext.define('PVE.form.CRSOptions', { viewModel: { data: { + crsMode: '__default__', autoRebalancing: 0, }, formulas: { - autoRebalancingDisabled: (get) => !get('autoRebalancing'), + canUseAutoRebalancing: (get) => + get('crsMode') === 'static' || get('crsMode') === 'dynamic', + autoRebalancingDisabled: (get) => + !get('autoRebalancing') || !get('canUseAutoRebalancing'), }, }, @@ -42,14 +46,15 @@ Ext.define('PVE.form.CRSOptions', { name: 'ha', fieldLabel: gettext('Scheduling Mode'), deleteEmpty: false, - value: '__default__', comboItems: [ ['__default__', Proxmox.Utils.defaultText + ' (basic)'], ['basic', gettext('Basic (Resource Count)')], ['static', gettext('Static Load')], ['dynamic', gettext('Dynamic Load')], ], - defaultValue: '__default__', + bind: { + value: '{crsMode}', + }, }, { xtype: 'proxmoxcheckbox', @@ -67,6 +72,7 @@ Ext.define('PVE.form.CRSOptions', { boxLabel: gettext('Automatically rebalance HA resources'), bind: { value: '{autoRebalancing}', + disabled: '{!canUseAutoRebalancing}', }, }, { -- 2.47.3