mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-06-22 06:40:52 +00:00
node/net: fix indentation a bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8aefd47ceb
commit
ea7da80cda
@ -98,43 +98,43 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
});
|
});
|
||||||
} else if (me.iftype === 'vlan') {
|
} else if (me.iftype === 'vlan') {
|
||||||
|
|
||||||
if(!me.isCreate) {
|
if (!me.isCreate) {
|
||||||
|
|
||||||
me.disablevlanid = false;
|
me.disablevlanid = false;
|
||||||
me.disablevlanrawdevice = false;
|
me.disablevlanrawdevice = false;
|
||||||
me.vlanrawdevicevalue = '';
|
me.vlanrawdevicevalue = '';
|
||||||
me.vlanidvalue = '';
|
me.vlanidvalue = '';
|
||||||
|
|
||||||
if (Proxmox.Utils.VlanInterface_match.test(me.iface)) {
|
if (Proxmox.Utils.VlanInterface_match.test(me.iface)) {
|
||||||
me.disablevlanid = true;
|
me.disablevlanid = true;
|
||||||
me.disablevlanrawdevice = true;
|
me.disablevlanrawdevice = true;
|
||||||
var arr = Proxmox.Utils.VlanInterface_match.exec(me.iface);
|
var arr = Proxmox.Utils.VlanInterface_match.exec(me.iface);
|
||||||
me.vlanrawdevicevalue = arr[1];
|
me.vlanrawdevicevalue = arr[1];
|
||||||
me.vlanidvalue = arr[2];
|
me.vlanidvalue = arr[2];
|
||||||
|
|
||||||
} else if (Proxmox.Utils.Vlan_match.test(me.iface)) {
|
} else if (Proxmox.Utils.Vlan_match.test(me.iface)) {
|
||||||
me.disablevlanid = true;
|
me.disablevlanid = true;
|
||||||
var arr = Proxmox.Utils.Vlan_match.exec(me.iface);
|
var arr = Proxmox.Utils.Vlan_match.exec(me.iface);
|
||||||
me.vlanidvalue = arr[1];
|
me.vlanidvalue = arr[1];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
me.disablevlanid = true;
|
me.disablevlanid = true;
|
||||||
me.disablevlanrawdevice = true;
|
me.disablevlanrawdevice = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
column2.push({
|
column2.push({
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: gettext('Vlan raw device'),
|
fieldLabel: gettext('Vlan raw device'),
|
||||||
name: 'vlan-raw-device',
|
name: 'vlan-raw-device',
|
||||||
value: me.vlanrawdevicevalue,
|
value: me.vlanrawdevicevalue,
|
||||||
disabled: me.disablevlanrawdevice
|
disabled: me.disablevlanrawdevice
|
||||||
});
|
});
|
||||||
|
|
||||||
column2.push({
|
column2.push({
|
||||||
xtype: 'pveVlanField',
|
xtype: 'pveVlanField',
|
||||||
name: 'vlan-id',
|
name: 'vlan-id',
|
||||||
value: me.vlanidvalue,
|
value: me.vlanidvalue,
|
||||||
disabled: me.disablevlanid
|
disabled: me.disablevlanid
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -231,39 +231,37 @@ Ext.define('Proxmox.node.NetworkEdit', {
|
|||||||
method = 'PUT';
|
method = 'PUT';
|
||||||
}
|
}
|
||||||
|
|
||||||
var column1 = [
|
var column1 = [{
|
||||||
{
|
xtype: 'hiddenfield',
|
||||||
xtype: 'hiddenfield',
|
name: 'type',
|
||||||
name: 'type',
|
value: me.iftype
|
||||||
value: me.iftype
|
},
|
||||||
},
|
{
|
||||||
{
|
xtype: me.isCreate ? 'textfield' : 'displayfield',
|
||||||
xtype: me.isCreate ? 'textfield' : 'displayfield',
|
fieldLabel: gettext('Name'),
|
||||||
fieldLabel: gettext('Name'),
|
name: 'iface',
|
||||||
name: 'iface',
|
value: me.iface,
|
||||||
value: me.iface,
|
vtype: iface_vtype,
|
||||||
vtype: iface_vtype,
|
allowBlank: false,
|
||||||
allowBlank: false,
|
listeners: {
|
||||||
listeners: {
|
change: function(f, value) {
|
||||||
change: function(f, value) {
|
if (me.isCreate && iface_vtype === 'VlanName') {
|
||||||
if (me.isCreate && iface_vtype === 'VlanName') {
|
var vlanidField = me.down('field[name=vlan-id]');
|
||||||
var vlanidField = me.down('field[name=vlan-id]');
|
var vlanrawdeviceField = me.down('field[name=vlan-raw-device]');
|
||||||
var vlanrawdeviceField = me.down('field[name=vlan-raw-device]');
|
if (Proxmox.Utils.VlanInterface_match.test(value)) {
|
||||||
if (Proxmox.Utils.VlanInterface_match.test(value)) {
|
vlanidField.setDisabled(true);
|
||||||
vlanidField.setDisabled(true);
|
vlanrawdeviceField.setDisabled(true);
|
||||||
vlanrawdeviceField.setDisabled(true);
|
} else if (Proxmox.Utils.Vlan_match.test(value)) {
|
||||||
} else if (Proxmox.Utils.Vlan_match.test(value)) {
|
vlanidField.setDisabled(true);
|
||||||
vlanidField.setDisabled(true);
|
vlanrawdeviceField.setDisabled(false);
|
||||||
vlanrawdeviceField.setDisabled(false);
|
} else {
|
||||||
} else {
|
vlanidField.setDisabled(false);
|
||||||
vlanidField.setDisabled(false);
|
vlanrawdeviceField.setDisabled(false);
|
||||||
vlanrawdeviceField.setDisabled(false);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
];
|
}];
|
||||||
|
|
||||||
if (me.iftype === 'OVSBond') {
|
if (me.iftype === 'OVSBond') {
|
||||||
column1.push(
|
column1.push(
|
||||||
|
Loading…
Reference in New Issue
Block a user