public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] ui: qga: parse boolean properties to correctly detect 'yes' and 'on' values
@ 2026-03-16 16:17 Fiona Ebner
  2026-03-16 18:22 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-03-16 16:17 UTC (permalink / raw)
  To: pve-devel

Passing a 'yes' or 'on' value along to the checkbox would leave the
checkbox disabled.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/manager6/form/AgentFeatureSelector.js | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js
index f1e30e21..a484bd99 100644
--- a/www/manager6/form/AgentFeatureSelector.js
+++ b/www/manager6/form/AgentFeatureSelector.js
@@ -124,21 +124,14 @@ Ext.define('PVE.form.AgentFeatureSelector', {
         let vm = me.getViewModel();
 
         let res = PVE.Parser.parsePropertyString(values.agent, 'enabled');
+        res.enabled = PVE.Parser.parseBoolean(res.enabled, false);
+        res.fstrim_cloned_disks = PVE.Parser.parseBoolean(res.fstrim_cloned_disks, false);
+        res['freeze-fs-on-backup'] = PVE.Parser.parseBoolean(res['freeze-fs-on-backup'], true);
+        res['guest-fsfreeze'] = PVE.Parser.parseBoolean(res['guest-fsfreeze'], true);
 
         // 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']) ||
-                PVE.Parser.parseBoolean(res['freeze-fs-on-backup']),
-        );
-
-        if (!Ext.isDefined(res['freeze-fs-on-backup'])) {
-            res['freeze-fs-on-backup'] = 1;
-        }
-        if (!Ext.isDefined(res['guest-fsfreeze'])) {
-            res['guest-fsfreeze'] = 1;
-        }
+        vm.set('hideFreezeFsOnBackup', res['freeze-fs-on-backup']);
 
         me.callParent([res]);
     },
-- 
2.47.3





^ permalink raw reply	[flat|nested] 2+ messages in thread

* applied: [PATCH manager] ui: qga: parse boolean properties to correctly detect 'yes' and 'on' values
  2026-03-16 16:17 [PATCH manager] ui: qga: parse boolean properties to correctly detect 'yes' and 'on' values Fiona Ebner
@ 2026-03-16 18:22 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-03-16 18:22 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Mon, 16 Mar 2026 17:17:05 +0100, Fiona Ebner wrote:
> Passing a 'yes' or 'on' value along to the checkbox would leave the
> checkbox disabled.
> 
> 

Applied, thanks!

[1/1] ui: qga: parse boolean properties to correctly detect 'yes' and 'on' values
      commit: e721cb2b39edfb57d8d534743938585688145ad7




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-16 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-16 16:17 [PATCH manager] ui: qga: parse boolean properties to correctly detect 'yes' and 'on' values Fiona Ebner
2026-03-16 18:22 ` applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal