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

Daniel Kral
2026-04-14T07:39:00Z

On Tue Apr 14, 2026 at 9:32 AM CEST, Michael Köppl wrote:
> On Tue Apr 14, 2026 at 9:18 AM CEST, Daniel Kral wrote:
>> 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.
>
> I personally don't like the idea of hiding options. I think I'd still
> prefer clearing the checkbox if the user selects default/basic, but I
> see your point that it's a bit weird UX-wise. I'd note, though, that
> we do this in other cases in the UI as well (see PCIEdit.js,
> OSTypeEdit.js, ...), so it's not too unexpected, I think.
>
> It it very subjective, though. Maybe someone else has a stronger opinion
> in this regard.

I'm not a fan of hiding the options either except it really makes sense
UX-wise, then I will go for clearing the options here! Thanks!

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