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

Daniel Kral
2026-04-14T07:17:28Z

On Mon Apr 13, 2026 at 6:01 PM CEST, Michael Köppl wrote:
> On Thu Apr 9, 2026 at 1:41 PM CEST, Daniel Kral wrote:
>
> [snip]
>
>> @@ -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}',
>
> not a big deal, but wanted to mention it nonetheless: if a user selects
> e.g. static mode and enables auto rebalancing and then later switches to
> basic mode, the checkbox remains checked visually, but the value is
> still set to false once submitted. It's just a cosmetic issue, but
> something I noticed during my testing.

Thanks for the feedback!

I thought about this too, but it also felt a little bit odd if a user
flicks through the scheduling modes and the auto rebalancing fields get
wiped every time the user goes to the default/basic scheduling mode...

Maybe a compromise is to completely hide those options alltogether, so
that the value isn't seen at all? Though that would hide the
functionality and it isn't the most obvious that one needs to select
'static' or 'dynamic' to get the auto rebalancing options.

>
>> },
>> },
>> {