lxc: correctly display cpulimit

the backend defaults to 0 (unlimited), so this should also be the default
in the GUI if nothing is set.
This commit is contained in:
Fabian Grünbichler 2016-09-15 14:51:56 +02:00 committed by Dietmar Maurer
parent b7c32bee5f
commit 203fd3488f
2 changed files with 3 additions and 2 deletions

View File

@ -131,6 +131,7 @@ Ext.define('PVE.lxc.CPUInputPanel', {
me.column1 = items;
} else {
me.items = items;
me.items[0].value = 0;
}
me.callParent();

View File

@ -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');
}
},