ui: lxc/Network: set empty datachache by default when in wizard

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2018-02-22 14:17:39 +01:00 committed by Dominik Csapak
parent f03db57eb6
commit d8e3d77c15
2 changed files with 6 additions and 6 deletions

View File

@ -50,7 +50,6 @@ Ext.define('PVE.lxc.CreateWizard', {
var networkpanel = Ext.create('PVE.lxc.NetworkInputPanel', {
title: gettext('Network'),
insideWizard: true,
dataCache: {},
isCreate: true
});

View File

@ -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";