This makes it slightly clearer that it's a default value (not being
written to the config explicitly). It's also in preparation to bind
the default based on the cgroup version, where it's a bit nicer to
bind the emptyText instead of the value (or a user set value would be
overwritten when the binding updates).

Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
---
 www/manager6/lxc/ResourceEdit.js   | 6 ++++--
 www/manager6/qemu/ProcessorEdit.js | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index 7b0d6886..42357d85 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -70,11 +70,13 @@ Ext.define('PVE.lxc.CPUInputPanel', {
            xtype: 'proxmoxintegerfield',
            name: 'cpuunits',
            fieldLabel: gettext('CPU units'),
-           value: 1024,
+           value: '',
            minValue: 8,
            maxValue: 500000,
+           emptyText: '1024',
            labelWidth: labelWidth,
-           allowBlank: false,
+           deleteEmpty: true,
+           allowBlank: true,
        },
     ],
 
diff --git a/www/manager6/qemu/ProcessorEdit.js 
b/www/manager6/qemu/ProcessorEdit.js
index 7bb4cc60..2edfc65c 100644
--- a/www/manager6/qemu/ProcessorEdit.js
+++ b/www/manager6/qemu/ProcessorEdit.js
@@ -190,7 +190,8 @@ Ext.define('PVE.qemu.ProcessorInputPanel', {
            // FIXME: change to [1, 1000] once cgroup v1 support gets removed 
(PVE 8 ?)
            minValue: 2,
            maxValue: 262144,
-           value: '1024',
+           value: '',
+           emptyText: '1024',
            deleteEmpty: true,
            allowBlank: true,
        },
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to