From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager v2 7/7] ui: qga: hide freeze-fs-on-backup conditionally
Date: Fri, 13 Mar 2026 10:55:33 +0100 [thread overview]
Message-ID: <20260313095534.79526-8-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20260313095534.79526-1-m.sandoval@proxmox.com>
If the freeze-fs-on-backup key is not explicitly set on the config file
or if it is explicitly enabled (which matches its default) we hide the
corresponding checkbox and hint.
Note that when the checkbox is unchecked we delete the value from the
config. A consequence of this is that if the deprecated key is
explicitly set `freeze-fs-on-backup=1`, we open the dialog, change some
unrelated setting (so that the OK button becomes sensitive), press OK to
save the settings, then the deprecated key freeze-fs-on-backup key would
be gone from the config.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
www/manager6/form/AgentFeatureSelector.js | 27 ++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js
index 39ee211a..51d9d94e 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: [
{
@@ -75,9 +86,10 @@ Ext.define('PVE.form.AgentFeatureSelector', {
'Freeze/thaw guest filesystems on backup for consistency. Deprecated in favor of the more general setting.',
),
name: 'freeze-fs-on-backup',
- reference: 'freeze_fs_on_backup',
bind: {
disabled: '{!enabled.checked}',
+ value: '{freezeFsOnBackupChecked}',
+ hidden: '{hideFreezeFsOnBackup}',
},
disabled: true,
uncheckedValue: '0',
@@ -90,7 +102,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}',
},
},
],
@@ -109,8 +121,17 @@ Ext.define('PVE.form.AgentFeatureSelector', {
setValues: function (values) {
let me = this;
+ let vm = me.getViewModel();
let res = PVE.Parser.parsePropertyString(values.agent, 'enabled');
+
+ // We hide the switch for the deprecated freeze-fs-on-backup if the setting was not
+ // explicitly set by the user or if was explicitly enabled.
+ vm.set(
+ 'hideFreezeFsOnBackup',
+ !Ext.isDefined(res['freeze-fs-on-backup']) || res['freeze-fs-on-backup'] === '1',
+ );
+
if (!Ext.isDefined(res['freeze-fs-on-backup'])) {
res['freeze-fs-on-backup'] = 1;
}
--
2.47.3
next prev parent reply other threads:[~2026-03-13 9:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 9:55 [PATCH manager v2 0/7] ui: qga: add checkbox for guest-fsfreeze Maximiliano Sandoval
2026-03-13 9:55 ` [PATCH manager v2 1/7] ui: utils: support guest-fsfreeze at render_qga_features Maximiliano Sandoval
2026-03-13 9:55 ` [PATCH manager v2 2/7] ui: qga: merge translatable string Maximiliano Sandoval
2026-03-13 9:55 ` [PATCH manager v2 3/7] ui: qga: move freeze-fs-on-backup to advanced opts Maximiliano Sandoval
2026-03-13 9:55 ` [PATCH manager v2 4/7] ui: qga: note that freeze-fs-on-backup is deprecated Maximiliano Sandoval
2026-03-13 9:55 ` [PATCH manager v2 5/7] ui: qga: add checkbox for guest-fsfreeze Maximiliano Sandoval
2026-03-16 21:41 ` Thomas Lamprecht
2026-03-13 9:55 ` [PATCH manager v2 6/7] ui: qga: call parameter me instead of this Maximiliano Sandoval
2026-03-13 9:55 ` Maximiliano Sandoval [this message]
2026-03-16 21:37 ` [PATCH manager v2 7/7] ui: qga: hide freeze-fs-on-backup conditionally Thomas Lamprecht
2026-03-16 15:29 ` applied: [PATCH manager v2 0/7] ui: qga: add checkbox for guest-fsfreeze Fiona Ebner
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=20260313095534.79526-8-m.sandoval@proxmox.com \
--to=m.sandoval@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.