From 203fd3488fce5863e9d1779a9b34d09181dc3b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 15 Sep 2016 14:51:56 +0200 Subject: [PATCH] lxc: correctly display cpulimit the backend defaults to 0 (unlimited), so this should also be the default in the GUI if nothing is set. --- www/manager6/lxc/ResourceEdit.js | 1 + www/manager6/lxc/Resources.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js index 498e789a..ff49e2f5 100644 --- a/www/manager6/lxc/ResourceEdit.js +++ b/www/manager6/lxc/ResourceEdit.js @@ -131,6 +131,7 @@ Ext.define('PVE.lxc.CPUInputPanel', { me.column1 = items; } else { me.items = items; + me.items[0].value = 0; } me.callParent(); diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js index 355b903a..70dfba53 100644 --- a/www/manager6/lxc/Resources.js +++ b/www/manager6/lxc/Resources.js @@ -62,10 +62,10 @@ Ext.define('PVE.lxc.RessourceView', { header: gettext('CPU limit'), never_delete: true, editor: caps.vms['VM.Config.CPU'] ? 'PVE.lxc.CPUEdit' : undefined, - defaultValue: 1, + defaultValue: 0, tdCls: 'pve-itype-icon-processor', renderer: function(value) { - if (value) { return value; } + if (value > 0) { return value; } return gettext('unlimited'); } },