From ea7da80cda894856200e54e06c9989f87b4b7c6f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 30 Jan 2020 16:30:19 +0100 Subject: [PATCH] node/net: fix indentation a bit Signed-off-by: Thomas Lamprecht --- node/NetworkEdit.js | 104 ++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/node/NetworkEdit.js b/node/NetworkEdit.js index 33fee75..b0bc531 100644 --- a/node/NetworkEdit.js +++ b/node/NetworkEdit.js @@ -98,43 +98,43 @@ Ext.define('Proxmox.node.NetworkEdit', { }); } else if (me.iftype === 'vlan') { - if(!me.isCreate) { + if (!me.isCreate) { - me.disablevlanid = false; - me.disablevlanrawdevice = false; - me.vlanrawdevicevalue = ''; - me.vlanidvalue = ''; + me.disablevlanid = false; + me.disablevlanrawdevice = false; + me.vlanrawdevicevalue = ''; + me.vlanidvalue = ''; - if (Proxmox.Utils.VlanInterface_match.test(me.iface)) { - me.disablevlanid = true; - me.disablevlanrawdevice = true; - var arr = Proxmox.Utils.VlanInterface_match.exec(me.iface); - me.vlanrawdevicevalue = arr[1]; - me.vlanidvalue = arr[2]; + if (Proxmox.Utils.VlanInterface_match.test(me.iface)) { + me.disablevlanid = true; + me.disablevlanrawdevice = true; + var arr = Proxmox.Utils.VlanInterface_match.exec(me.iface); + me.vlanrawdevicevalue = arr[1]; + me.vlanidvalue = arr[2]; - } else if (Proxmox.Utils.Vlan_match.test(me.iface)) { - me.disablevlanid = true; - var arr = Proxmox.Utils.Vlan_match.exec(me.iface); - me.vlanidvalue = arr[1]; - } - } else { + } else if (Proxmox.Utils.Vlan_match.test(me.iface)) { + me.disablevlanid = true; + var arr = Proxmox.Utils.Vlan_match.exec(me.iface); + me.vlanidvalue = arr[1]; + } + } else { - me.disablevlanid = true; - me.disablevlanrawdevice = true; + me.disablevlanid = true; + me.disablevlanrawdevice = true; } column2.push({ xtype: 'textfield', fieldLabel: gettext('Vlan raw device'), name: 'vlan-raw-device', - value: me.vlanrawdevicevalue, + value: me.vlanrawdevicevalue, disabled: me.disablevlanrawdevice }); column2.push({ xtype: 'pveVlanField', name: 'vlan-id', - value: me.vlanidvalue, + value: me.vlanidvalue, disabled: me.disablevlanid }); @@ -231,39 +231,37 @@ Ext.define('Proxmox.node.NetworkEdit', { method = 'PUT'; } - var column1 = [ - { - xtype: 'hiddenfield', - name: 'type', - value: me.iftype - }, - { - xtype: me.isCreate ? 'textfield' : 'displayfield', - fieldLabel: gettext('Name'), - name: 'iface', - value: me.iface, - vtype: iface_vtype, - allowBlank: false, - listeners: { - change: function(f, value) { - if (me.isCreate && iface_vtype === 'VlanName') { - var vlanidField = me.down('field[name=vlan-id]'); - var vlanrawdeviceField = me.down('field[name=vlan-raw-device]'); - if (Proxmox.Utils.VlanInterface_match.test(value)) { - vlanidField.setDisabled(true); - vlanrawdeviceField.setDisabled(true); - } else if (Proxmox.Utils.Vlan_match.test(value)) { - vlanidField.setDisabled(true); - vlanrawdeviceField.setDisabled(false); - } else { - vlanidField.setDisabled(false); - vlanrawdeviceField.setDisabled(false); - } - } - } - } + var column1 = [{ + xtype: 'hiddenfield', + name: 'type', + value: me.iftype + }, + { + xtype: me.isCreate ? 'textfield' : 'displayfield', + fieldLabel: gettext('Name'), + name: 'iface', + value: me.iface, + vtype: iface_vtype, + allowBlank: false, + listeners: { + change: function(f, value) { + if (me.isCreate && iface_vtype === 'VlanName') { + var vlanidField = me.down('field[name=vlan-id]'); + var vlanrawdeviceField = me.down('field[name=vlan-raw-device]'); + if (Proxmox.Utils.VlanInterface_match.test(value)) { + vlanidField.setDisabled(true); + vlanrawdeviceField.setDisabled(true); + } else if (Proxmox.Utils.Vlan_match.test(value)) { + vlanidField.setDisabled(true); + vlanrawdeviceField.setDisabled(false); + } else { + vlanidField.setDisabled(false); + vlanrawdeviceField.setDisabled(false); + } + } + } } - ]; + }]; if (me.iftype === 'OVSBond') { column1.push(