[pve-devel] r6256 - in pve-manager/pve2: . www/manager/node

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Jul 7 12:33:59 CEST 2011


Author: dietmar
Date: 2011-07-07 12:33:59 +0200 (Thu, 07 Jul 2011)
New Revision: 6256

Modified:
   pve-manager/pve2/ChangeLog
   pve-manager/pve2/www/manager/node/NetworkEdit.js
Log:
	* www/manager/node/NetworkEdit.js: correctly set me.create flag



Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog	2011-07-07 10:28:27 UTC (rev 6255)
+++ pve-manager/pve2/ChangeLog	2011-07-07 10:33:59 UTC (rev 6256)
@@ -1,5 +1,7 @@
 2011-07-07  Proxmox Support Team  <support at proxmox.com>
 
+	* www/manager/node/NetworkEdit.js: correctly set me.create flag
+
 	* www/manager/form/DiskFormatSelector.js: use PVE.form.KVComboBox
 
 	* www/manager/form/BondModeSelector.js: use PVE.form.KVComboBox

Modified: pve-manager/pve2/www/manager/node/NetworkEdit.js
===================================================================
--- pve-manager/pve2/www/manager/node/NetworkEdit.js	2011-07-07 10:28:27 UTC (rev 6255)
+++ pve-manager/pve2/www/manager/node/NetworkEdit.js	2011-07-07 10:33:59 UTC (rev 6256)
@@ -12,12 +12,12 @@
 	if (!me.iftype) 
 	    throw "no network device type specified";
 
-	var create = !me.iface;
+	me.create = !me.iface;
 
 	var title;
 	var iface_vtype;
 
-	if (create) {
+	if (me.create) {
 	    if (me.iftype === 'bridge') {
 		title = "Create Bridge";
 		iface_vtype = 'BridgeName';
@@ -36,7 +36,7 @@
 		fieldLabel: 'Autostart',
 		name: 'autostart',
 		uncheckedValue: 0,
-		checked: create ? true : undefined
+		checked: me.create ? true : undefined
 	    }
 	];
 
@@ -56,7 +56,7 @@
 		xtype: 'bondModeSelector',
 		fieldLabel: 'Mode',
 		name: 'bond_mode',
-		value: create ? 'balance-rr' : undefined,
+		value: me.create ? 'balance-rr' : undefined,
 		allowBlank: false
 	    });
 	}
@@ -64,7 +64,7 @@
 	var url;
 	var method;
 
-	if (create) {
+	if (me.create) {
 	    url = "/api2/extjs/nodes/" + nodename + "/network";
 	    method = 'POST';
 	} else {
@@ -74,7 +74,7 @@
 
 	me.column1 = [
 	    {
-		xtype: create ? 'textfield' : 'displayfield',
+		xtype: me.create ? 'textfield' : 'displayfield',
 		fieldLabel: 'Name',
 		name: 'iface',
 		value: me.iface,
@@ -83,14 +83,14 @@
 	    },
 	    {
 		xtype: 'pvetextfield',
-		deleteEmpty: !create,
+		deleteEmpty: !me.create,
 		fieldLabel: 'IP address',
 		vtype: 'IPAddress',
 		name: 'address'
 	    },
 	    {
 		xtype: 'pvetextfield',
-		deleteEmpty: !create,
+		deleteEmpty: !me.create,
 		fieldLabel: 'Subnet mask',
 		vtype: 'IPAddress',
 		name: 'netmask',
@@ -111,7 +111,7 @@
 	    },
 	    {
 		xtype: 'pvetextfield',
-		deleteEmpty: !create,
+		deleteEmpty: !me.create,
 		fieldLabel: 'Gateway',
 		vtype: 'IPAddress',
 		name: 'gateway'
@@ -126,7 +126,7 @@
 
 	me.callParent();
 
-	if (create) {
+	if (me.create) {
 	    me.down('field[name=iface]').setValue(me.iface_default);
 	} else {
 	    me.load({




More information about the pve-devel mailing list