mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 05:45:00 +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: '',
|
||||
tdCls: 'pve-itype-icon-processor',
|
||||
renderer: function(value) {
|
||||
if (value) { return value; }
|
||||
return gettext('unlimited');
|
||||
var cpulimit = me.getObjectValue('cpulimit');
|
||||
var cpuunits = me.getObjectValue('cpuunits');
|
||||
var res;
|
||||
if (value) {
|
||||
res = value;
|
||||
} else {
|
||||
res = gettext('unlimited');
|
||||
}
|
||||
},
|
||||
cpulimit: {
|
||||
header: gettext('CPU limit'),
|
||||
editor: caps.vms['VM.Config.CPU'] ? 'PVE.lxc.CPUEdit' : undefined,
|
||||
defaultValue: 0,
|
||||
tdCls: 'pve-itype-icon-processor',
|
||||
renderer: function(value) {
|
||||
if (value > 0) { return value; }
|
||||
return gettext('unlimited');
|
||||
|
||||
if (cpulimit) {
|
||||
res += ' [cpulimit=' + cpulimit + ']';
|
||||
}
|
||||
|
||||
if (cpuunits) {
|
||||
res += ' [cpuunits=' + cpuunits + ']';
|
||||
}
|
||||
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: {
|
||||
header: gettext('Root Disk'),
|
||||
@ -85,6 +84,12 @@ Ext.define('PVE.lxc.RessourceView', {
|
||||
editor: mpeditor,
|
||||
tdCls: 'pve-itype-icon-storage'
|
||||
},
|
||||
cpulimit: {
|
||||
visible: false
|
||||
},
|
||||
cpuunits: {
|
||||
visible: false
|
||||
},
|
||||
unprivileged: {
|
||||
visible: false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user