[pve-devel] [PATCH manager 09/11] lxc/ResoureEdit: move some cpu fields to advanced options

Dominik Csapak d.csapak at proxmox.com
Thu Apr 5 16:03:54 CEST 2018


and show them now also in the wizard

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/lxc/ResourceEdit.js | 69 +++++++++++++++++++---------------------
 1 file changed, 32 insertions(+), 37 deletions(-)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index 395c31e8..ec697cac 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -55,54 +55,49 @@ Ext.define('PVE.lxc.CPUInputPanel', {
 	return values;
     },
 
-    initComponent : function() {
+    advancedColumn1: [
+	{
+	    xtype: 'numberfield',
+	    name: 'cpulimit',
+	    minValue: 0,
+	    value: '',
+	    step: 1,
+	    fieldLabel: gettext('CPU limit'),
+	    allowBlank: true,
+	    emptyText: gettext('unlimited')
+	}
+    ],
+
+    advancedColumn2: [
+	{
+	    xtype: 'proxmoxintegerfield',
+	    name: 'cpuunits',
+	    fieldLabel: gettext('CPU units'),
+	    value: 1024,
+	    minValue: 8,
+	    maxValue: 500000,
+	    labelWidth: labelWidth,
+	    allowBlank: false
+	}
+    ],
+
+    initComponent: function() {
 	var me = this;
 
-	var column1 = [
-            {
-                xtype: 'proxmoxintegerfield',
-                name: 'cores',
+	me.column1 = [
+	    {
+		xtype: 'proxmoxintegerfield',
+		name: 'cores',
 		minValue: 1,
 		maxValue: 128,
 		value: me.insideWizard ? 1 : '',
 		fieldLabel: gettext('Cores'),
 		allowBlank: true,
 		deleteEmpty: true,
-                emptyText: gettext('unlimited')
-            }
-	];
-
-	var column2 = [
-	    {
-		xtype: 'numberfield',
-		name: 'cpulimit',
-		minValue: 0,
-		value: '',
-		step: 1,
-		fieldLabel: gettext('CPU limit'),
-		labelWidth: labelWidth,
-		allowBlank: true,
-                emptyText: gettext('unlimited')
-	    },
-	    {
-		xtype: 'proxmoxintegerfield',
-		name: 'cpuunits',
-		fieldLabel: gettext('CPU units'),
-		value: 1024,
-		minValue: 8,
-		maxValue: 500000,
-		labelWidth: labelWidth,
-		allowBlank: false
+		emptyText: gettext('unlimited')
 	    }
 	];
 
-	if (me.insideWizard) {
-	    me.column1 = column1;
-	} else {
-	    me.column1 = column1;
-	    me.column2 = column2;
-	}
-   
 	me.callParent();
     }
 });
-- 
2.11.0





More information about the pve-devel mailing list