[pve-devel] [PATCH] fix create CT: this fix the create CT what happend in previous refactoring.

Wolfgang Link w.link at proxmox.com
Fri Oct 23 15:33:19 CEST 2015


---
 www/manager/lxc/CreateWizard.js | 15 +++++++++++--
 www/manager/lxc/ResourceEdit.js | 49 ++++++++++++++++++++++++++++++++++++-----
 2 files changed, 56 insertions(+), 8 deletions(-)

diff --git a/www/manager/lxc/CreateWizard.js b/www/manager/lxc/CreateWizard.js
index c0a30a3..c862d44 100644
--- a/www/manager/lxc/CreateWizard.js
+++ b/www/manager/lxc/CreateWizard.js
@@ -160,9 +160,20 @@ Ext.define('PVE.lxc.CreateWizard', {
 		    ]
 		},
 		{
-		    xtype: 'pveLxcResourceInputPanel',
+		    xtype: 'inputpanel',
 		    title: gettext('Resources'),
-		    insideWizard: true
+		    items: [
+			{
+			    xtype: 'pveLxcMemoryInputPanel',
+			    title: gettext('Memory'),
+			    insideWizard: true
+			},
+			{
+			    xtype: 'pveLxcCPUInputPanel',
+			    title: gettext('CPU'),
+			    insideWizard: true
+			}
+		    ]
 		},
 		networkpanel,
 		{
diff --git a/www/manager/lxc/ResourceEdit.js b/www/manager/lxc/ResourceEdit.js
index 41d772c..1a59c49 100644
--- a/www/manager/lxc/ResourceEdit.js
+++ b/www/manager/lxc/ResourceEdit.js
@@ -1,5 +1,23 @@
 var labelWidth = 120;
 
+Ext.define('PVE.lxc.MemoryEdit', {
+    extend: 'PVE.window.Edit',
+
+    initComponent : function() {
+	var me = this;
+
+	Ext.apply(me, {
+	    subject: gettext('Memory'),
+	    items: Ext.create('PVE.lxc.MemoryInputPanel')
+	});
+
+	me.callParent();
+
+	me.load();
+    }
+});
+
+
 Ext.define('PVE.lxc.CPUEdit', {
     extend: 'PVE.window.Edit',
 
@@ -8,6 +26,26 @@ Ext.define('PVE.lxc.CPUEdit', {
 
 	Ext.apply(me, {
 	    subject: gettext('CPU'),
+	    items: Ext.create('PVE.lxc.CPUInputPanel')
+	});
+
+	me.callParent();
+
+	me.load();
+    }
+});
+
+Ext.define('PVE.lxc.CPUInputPanel', {
+    extend: 'PVE.panel.InputPanel',
+    alias: 'widget.pveLxcCPUInputPanel',
+
+    insideWizard: false,
+
+    initComponent : function() {
+	var me = this;
+
+	Ext.apply(me, {
+	    subject: gettext('CPU'),
 	    items: [
 		{
 		    xtype: 'numberfield',
@@ -33,13 +71,14 @@ Ext.define('PVE.lxc.CPUEdit', {
 	});
 
 	me.callParent();
-
-	me.load();
     }
 });
 
-Ext.define('PVE.lxc.MemoryEdit', {
-    extend: 'PVE.window.Edit',
+Ext.define('PVE.lxc.MemoryInputPanel', {
+    extend: 'PVE.panel.InputPanel',
+    alias: 'widget.pveLxcMemoryInputPanel',
+
+    insideWizard: false,
 
     initComponent : function() {
 	var me = this;
@@ -73,7 +112,5 @@ Ext.define('PVE.lxc.MemoryEdit', {
 	});
 
 	me.callParent();
-
-	me.load();
     }
 });
-- 
2.1.4





More information about the pve-devel mailing list