From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 703B31FF140 for ; Fri, 13 Mar 2026 10:57:31 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id ADAE1DDE8; Fri, 13 Mar 2026 10:57:32 +0100 (CET) From: Maximiliano Sandoval To: Fiona Ebner Subject: superseded: [PATCH manager 7/7] ui: qga: hide freeze-fs-on-backup check if undefined In-Reply-To: <2351c696-e05c-4994-bdfc-0e98a9c7366b@proxmox.com> (Fiona Ebner's message of "Wed, 11 Mar 2026 16:58:10 +0100") References: <20260225154614.681858-1-m.sandoval@proxmox.com> <20260225154614.681858-8-m.sandoval@proxmox.com> <2351c696-e05c-4994-bdfc-0e98a9c7366b@proxmox.com> User-Agent: mu4e 1.12.9; emacs 30.1 Date: Fri, 13 Mar 2026 10:56:57 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773395780753 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.111 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: G7HXDQMO6FQRUETYGRFHQNBEPOMO7HVL X-Message-ID-Hash: G7HXDQMO6FQRUETYGRFHQNBEPOMO7HVL X-MailFrom: m.sandoval@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Fiona Ebner 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 >> --- >> 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