mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 03:58:26 +00:00
merge cores, cpulimit and cpuunits for containers
like we do for qemu vms Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
34c235bea6
commit
3e4b78dc68
@ -59,25 +59,24 @@ Ext.define('PVE.lxc.RessourceView', {
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
tdCls: 'pve-itype-icon-processor',
|
tdCls: 'pve-itype-icon-processor',
|
||||||
renderer: function(value) {
|
renderer: function(value) {
|
||||||
if (value) { return value; }
|
var cpulimit = me.getObjectValue('cpulimit');
|
||||||
return gettext('unlimited');
|
var cpuunits = me.getObjectValue('cpuunits');
|
||||||
|
var res;
|
||||||
|
if (value) {
|
||||||
|
res = value;
|
||||||
|
} else {
|
||||||
|
res = gettext('unlimited');
|
||||||
}
|
}
|
||||||
},
|
|
||||||
cpulimit: {
|
if (cpulimit) {
|
||||||
header: gettext('CPU limit'),
|
res += ' [cpulimit=' + cpulimit + ']';
|
||||||
editor: caps.vms['VM.Config.CPU'] ? 'PVE.lxc.CPUEdit' : undefined,
|
}
|
||||||
defaultValue: 0,
|
|
||||||
tdCls: 'pve-itype-icon-processor',
|
if (cpuunits) {
|
||||||
renderer: function(value) {
|
res += ' [cpuunits=' + cpuunits + ']';
|
||||||
if (value > 0) { return value; }
|
}
|
||||||
return gettext('unlimited');
|
return res;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
cpuunits: {
|
|
||||||
header: gettext('CPU units'),
|
|
||||||
editor: caps.vms['VM.Config.CPU'] ? 'PVE.lxc.CPUEdit' : undefined,
|
|
||||||
defaultValue: 1024,
|
|
||||||
tdCls: 'pve-itype-icon-processor'
|
|
||||||
},
|
},
|
||||||
rootfs: {
|
rootfs: {
|
||||||
header: gettext('Root Disk'),
|
header: gettext('Root Disk'),
|
||||||
@ -85,6 +84,12 @@ Ext.define('PVE.lxc.RessourceView', {
|
|||||||
editor: mpeditor,
|
editor: mpeditor,
|
||||||
tdCls: 'pve-itype-icon-storage'
|
tdCls: 'pve-itype-icon-storage'
|
||||||
},
|
},
|
||||||
|
cpulimit: {
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
cpuunits: {
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
unprivileged: {
|
unprivileged: {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user