From 08d1d263567d01fc5bf1447c4aedb8dfdea0d5ea Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 2 Jun 2015 15:51:46 +0200 Subject: [PATCH] LXC GUI: use cpulimit instead of cpus And move cpuunits to resource panel. --- www/manager/lxc/Options.js | 16 ---------------- www/manager/lxc/Resources.js | 23 +++++++++++++++++++---- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/www/manager/lxc/Options.js b/www/manager/lxc/Options.js index 9ac81e6f..c133e9cc 100644 --- a/www/manager/lxc/Options.js +++ b/www/manager/lxc/Options.js @@ -50,22 +50,6 @@ Ext.define('PVE.lxc.Options', { storage: { header: gettext('Storage'), defaultValue: 'no set' - }, - cpuunits: { - header: gettext('CPU units'), - defaultValue: '1024', - editor: caps.vms['VM.Config.CPU'] ? { - xtype: 'pveWindowEdit', - subject: gettext('CPU units'), - items: { - xtype: 'numberfield', - name: 'cpuunits', - fieldLabel: gettext('CPU units'), - minValue: 8, - maxValue: 500000, - allowBlank: false - } - } : undefined } }; diff --git a/www/manager/lxc/Resources.js b/www/manager/lxc/Resources.js index f852310a..4bbbcde5 100644 --- a/www/manager/lxc/Resources.js +++ b/www/manager/lxc/Resources.js @@ -49,11 +49,20 @@ Ext.define('PVE.lxc.RessourceInputPanel', { }, { xtype: 'numberfield', - name: 'cpus', + name: 'cpulimit', minValue: 0, value: '1', step: 1, - fieldLabel: gettext('CPUs'), + fieldLabel: gettext('CPU limit'), + labelWidth: labelWidth, + allowBlank: false + }, + { + xtype: 'numberfield', + name: 'cpuunits', + fieldLabel: gettext('CPU units'), + minValue: 8, + maxValue: 500000, labelWidth: labelWidth, allowBlank: false } @@ -122,8 +131,8 @@ Ext.define('PVE.lxc.RessourceView', { return PVE.Utils.format_size(value*1024*1024); } }, - cpus: { - header: gettext('Processors'), + cpulimit: { + header: gettext('CPU limit'), never_delete: true, editor: resEditor, defaultValue: 1, @@ -132,6 +141,12 @@ Ext.define('PVE.lxc.RessourceView', { return gettext('unlimited'); } }, + cpuunits: { + header: gettext('CPU units'), + never_delete: true, + editor: resEditor, + defaultValue: 1024 + }, disk: { header: gettext('Disk size'), editor: resEditor,