From a3b5c220f99e773ae25f0a7167dd76120eaaddb9 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Fri, 7 Oct 2022 14:41:54 +0200 Subject: [PATCH] ui: lxc/qemu: cpu edit: use emptyText for cpuunits 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 --- 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.39.2