From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: superseded: [PATCH manager 7/7] ui: qga: hide freeze-fs-on-backup check if undefined
Date: Fri, 13 Mar 2026 10:56:57 +0100 [thread overview]
Message-ID: <s8oy0jwyrva.fsf@toolbox> (raw)
In-Reply-To: <2351c696-e05c-4994-bdfc-0e98a9c7366b@proxmox.com> (Fiona Ebner's message of "Wed, 11 Mar 2026 16:58:10 +0100")
Fiona Ebner <f.ebner@proxmox.com> writes:
> Am 25.02.26 um 4:46 PM schrieb Maximiliano Sandoval:
>> If the freeze-fs-on-backup key is not explicitly set on the config file
>> we hide the corresponding checkbox and hint.
>>
>> Note that when the checkbox is unchecked we delete the value from the
>> config resulting.
>>
>> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
>> ---
>> www/manager6/form/AgentFeatureSelector.js | 21 ++++++++++++++++++---
>> 1 file changed, 18 insertions(+), 3 deletions(-)
>>
>> diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js
>> index 1a87182d..deb774c1 100644
>> --- a/www/manager6/form/AgentFeatureSelector.js
>> +++ b/www/manager6/form/AgentFeatureSelector.js
>> @@ -2,7 +2,18 @@ Ext.define('PVE.form.AgentFeatureSelector', {
>> extend: 'Proxmox.panel.InputPanel',
>> alias: ['widget.pveAgentFeatureSelector'],
>>
>> - viewModel: {},
>> + viewModel: {
>> + data: {
>> + hideFreezeFsOnBackup: true,
>> + freezeFsOnBackupChecked: true,
>> + },
>> +
>> + formulas: {
>> + hideFreezeFsOnBackupNotes: function (get) {
>> + return get('freezeFsOnBackupChecked') || get('hideFreezeFsOnBackup');
>> + },
>> + },
>> + },
>>
>> items: [
>> {
>> @@ -71,9 +82,10 @@ Ext.define('PVE.form.AgentFeatureSelector', {
>> xtype: 'proxmoxcheckbox',
>> boxLabel: gettext('Deprecated. Freeze/thaw guest filesystems on backup for consistency'),
>> name: 'freeze-fs-on-backup',
>> - reference: 'freeze_fs_on_backup',
>> bind: {
>> disabled: '{!enabled.checked}',
>> + value: '{freezeFsOnBackupChecked}',
>> + hidden: '{hideFreezeFsOnBackup}',
>> },
>> disabled: true,
>> uncheckedValue: '0',
>> @@ -86,7 +98,7 @@ Ext.define('PVE.form.AgentFeatureSelector', {
>> 'Freeze/thaw for guest filesystems disabled. This can lead to inconsistent disk backups.',
>> ),
>> bind: {
>> - hidden: '{freeze_fs_on_backup.checked}',
>> + hidden: '{hideFreezeFsOnBackupNotes}',
>> },
>> },
>> ],
>> @@ -105,10 +117,13 @@ Ext.define('PVE.form.AgentFeatureSelector', {
>>
>> setValues: function (values) {
>> let me = this;
>> + let vm = me.getViewModel();
>>
>> let res = PVE.Parser.parsePropertyString(values.agent, 'enabled');
>> if (!Ext.isDefined(res['freeze-fs-on-backup'])) {
>> res['freeze-fs-on-backup'] = 1;
>> + } else {
>> + vm.set('hideFreezeFsOnBackup', false);
>
> Checking for definedness is not enough: it should only be visible if
> explicitly set to false, but not if explicitly set to true.
For the record, my original intention was to also display the checkbox
if it was explicitly enabled. I sent v2 with the requested changes.
>> }
>> if (!Ext.isDefined(res['guest-fsfreeze'])) {
>> res['guest-fsfreeze'] = 1;
Superseded-by: https://lore.proxmox.com/all/20260313095534.79526-1-m.sandoval@proxmox.com/T/#u
--
Maximiliano
next prev parent reply other threads:[~2026-03-13 9:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 15:45 [PATCH manager 0/7] ui: qga: add checkbox for guest-fsfreeze Maximiliano Sandoval
2026-02-25 15:45 ` [PATCH manager 1/7] ui: utils: support guest-fsfreeze at render_qga_features Maximiliano Sandoval
2026-03-11 15:58 ` Fiona Ebner
2026-02-25 15:45 ` [PATCH manager 2/7] ui: qga: merge translatable string Maximiliano Sandoval
2026-03-11 15:58 ` Fiona Ebner
2026-02-25 15:45 ` [PATCH manager 3/7] ui: qga: move freeze-fs-on-backup to advanced opts Maximiliano Sandoval
2026-03-11 15:58 ` Fiona Ebner
2026-02-25 15:45 ` [PATCH manager 4/7] ui: qga: note that freeze-fs-on-backup is deprecated Maximiliano Sandoval
2026-03-11 15:57 ` Fiona Ebner
2026-02-25 15:45 ` [PATCH manager 5/7] ui: qga: add checkbox for guest-fsfreeze Maximiliano Sandoval
2026-03-11 15:58 ` Fiona Ebner
2026-02-25 15:45 ` [PATCH manager 6/7] ui: qga: call parameter me instead of this Maximiliano Sandoval
2026-03-11 15:58 ` Fiona Ebner
2026-02-25 15:45 ` [PATCH manager 7/7] ui: qga: hide freeze-fs-on-backup check if undefined Maximiliano Sandoval
2026-03-11 15:58 ` Fiona Ebner
2026-03-13 9:56 ` Maximiliano Sandoval [this message]
2026-02-25 16:03 ` [PATCH manager 0/7] ui: qga: add checkbox for guest-fsfreeze Maximiliano Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s8oy0jwyrva.fsf@toolbox \
--to=m.sandoval@proxmox.com \
--cc=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox