[pve-devel] [PATCH manager v2 3/5] ui: lxc/Network: set empty datachache by default when in wizard

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Feb 22 14:17:39 CET 2018


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/lxc/CreateWizard.js |  1 -
 www/manager6/lxc/Network.js      | 11 ++++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index 65b1348d..8a40c917 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -50,7 +50,6 @@ Ext.define('PVE.lxc.CreateWizard', {
 	var networkpanel = Ext.create('PVE.lxc.NetworkInputPanel', {
 	    title: gettext('Network'),
 	    insideWizard: true,
-	    dataCache: {},
 	    isCreate: true
 	});
 
diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index 1b574239..22d30055 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -49,17 +49,18 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
     initComponent : function() {
 	var me = this;
 
-	if (!me.dataCache) {
-	    throw "no dataCache specified";
-	}
-	
 	var cdata = {};
 
 	if (me.insideWizard) {
 	    me.ifname = 'net0';
 	    cdata.name = 'eth0';
+	    me.dataCache = {};
 	}
-	
+
+	if (!me.dataCache) {
+	    throw "no dataCache specified";
+	}
+
 	if (!me.isCreate) {
 	    if (!me.ifname) {
 		throw "no interface name specified";
-- 
2.14.2





More information about the pve-devel mailing list