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 B80A61FF0C0 for ; Wed, 21 Oct 2026 11:00:00 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4F64F216B0; Wed, 21 Oct 2026 10:59:42 +0200 (CEST) From: Dominik Rusovac To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager 07/15] fix #7993: ui: form: crs options: add weights Date: Wed, 21 Oct 2026 10:59:24 +0200 Message-ID: <20261021085932.1196302-8-d.rusovac@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261021085932.1196302-1-d.rusovac@proxmox.com> References: <20261021085932.1196302-1-d.rusovac@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792573177479 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.128 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: JCGPK3S3OS2JV7W5K5BQANPHOUYFE7NO X-Message-ID-Hash: JCGPK3S3OS2JV7W5K5BQANPHOUYFE7NO 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: Default 'Memory Weight' changes with selected method; value should be 5 for 'TOPSIS' and 1 otherwise. Signed-off-by: Dominik Rusovac --- www/manager6/form/CRSOptions.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/www/manager6/form/CRSOptions.js b/www/manager6/form/CRSOptions.js index 84f6d506..cde389ee 100644 --- a/www/manager6/form/CRSOptions.js +++ b/www/manager6/form/CRSOptions.js @@ -20,6 +20,7 @@ Ext.define('PVE.form.CRSOptions', { viewModel: { data: { crsMode: '__default__', + rebalanceMethod: '__default__', autoRebalancing: 0, }, formulas: { @@ -27,6 +28,9 @@ Ext.define('PVE.form.CRSOptions', { get('crsMode') === 'static' || get('crsMode') === 'dynamic', autoRebalancingDisabled: (get) => !get('autoRebalancing') || !get('canUseAutoRebalancing'), + isTopsis: (get) => get('rebalanceMethod') === 'topsis', + memWeightEmptyText: (get) => + Proxmox.Utils.defaultText + (get('isTopsis') ? ' (5)' : ' (1)'), }, }, @@ -100,6 +104,7 @@ Ext.define('PVE.form.CRSOptions', { ], defaultValue: '__default__', bind: { + value: '{rebalanceMethod}', disabled: '{autoRebalancingDisabled}', }, }, @@ -126,6 +131,28 @@ Ext.define('PVE.form.CRSOptions', { disabled: '{autoRebalancingDisabled}', }, }, + { + xtype: 'numberfield', + name: 'ha-auto-rebalance-cpu-weight', + fieldLabel: gettext('CPU Weight'), + emptyText: Proxmox.Utils.defaultText + ' (1)', + minValue: 0, + step: 1, + bind: { + disabled: '{autoRebalancingDisabled}', + }, + }, + { + xtype: 'numberfield', + name: 'ha-auto-rebalance-mem-weight', + fieldLabel: gettext('Memory Weight'), + minValue: 0, + step: 1, + bind: { + disabled: '{autoRebalancingDisabled}', + emptyText: '{memWeightEmptyText}', + }, + }, ], }, ], -- 2.47.3