[PATCH manager 05/18] ui: form/CRSOptions: allow auto rebalancing only for static and dynamic mode

Daniel Kral
2026-04-09T11:42:26Z

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 <d.kral@proxmox.com>
---
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