]> git.proxmox.com Git - pve-manager.git/commitdiff
comestic : switch proto and interface in forms
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 19 May 2014 03:42:21 +0000 (05:42 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 19 May 2014 03:57:56 +0000 (05:57 +0200)
for readability, better to have

macro
proto
src port
dest port

in same column

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
www/manager/grid/FirewallRules.js

index 281415b5eb8d04fe82be6fc6e1192fa48306f1cf..b7a53fe603cc37901fc8b38bb8644ce1d1b81ace 100644 (file)
@@ -70,18 +70,27 @@ Ext.define('PVE.FirewallRulePanel', {
                data: [['ACCEPT', 'ACCEPT'], ['DROP', 'DROP'], ['REJECT', 'REJECT']],
                fieldLabel: gettext('Action'),
                allowBlank: false
-           },
-           {
-               xtype: 'pveKVComboBox',
-               name: 'proto',
-               value: '',
+           }
+        ];
+
+       if (me.allow_iface) {
+           me.column1.push({
+               xtype: 'pvetextfield',
+               name: 'iface',
                deleteEmpty: !me.create,
-               emptyText: 'any',
-               editable: true,
-               data: [['tcp', 'TCP'], ['udp', 'UDP'], ['icmp', 'ICMP']],
-               fieldLabel: gettext('Protocol'),
-               allowBlank: true
-           },
+               value: '',
+               fieldLabel: gettext('Interface')
+           });
+       } else {
+           me.column1.push({
+               xtype: 'displayfield',
+               fieldLabel: '',
+               height: 22, // hack: set same height as text fields
+               value: ''
+           });
+       }
+
+       me.column1.push([
            {
                xtype: 'displayfield',
                fieldLabel: '',
@@ -106,7 +115,7 @@ Ext.define('PVE.FirewallRulePanel', {
                value: '',
                fieldLabel: gettext('Destination')
            }
-       ];
+       ]);
 
        me.column2 = [
            {
@@ -124,27 +133,18 @@ Ext.define('PVE.FirewallRulePanel', {
                deleteEmpty: !me.create,
                fieldLabel: gettext('Macro'),
                allowBlank: true
-           }
-       ];
-
-       if (me.allow_iface) {
-           me.column2.push({
-               xtype: 'pvetextfield',
-               name: 'iface',
-               deleteEmpty: !me.create,
+           },
+           {
+               xtype: 'pveKVComboBox',
+               name: 'proto',
                value: '',
-               fieldLabel: gettext('Interface')
-           });
-       } else {
-           me.column2.push({
-               xtype: 'displayfield',
-               fieldLabel: '',
-               height: 22, // hack: set same height as text fields
-               value: ''
-           });
-       }
-
-       me.column2.push([
+               deleteEmpty: !me.create,
+               emptyText: 'any',
+               editable: true,
+               data: [['tcp', 'TCP'], ['udp', 'UDP'], ['icmp', 'ICMP']],
+               fieldLabel: gettext('Protocol'),
+               allowBlank: true
+           },
            {
                xtype: 'displayfield',
                fieldLabel: '',
@@ -164,7 +164,7 @@ Ext.define('PVE.FirewallRulePanel', {
                value: '',
                fieldLabel: gettext('Dest. port')
            }
-       ]);
+       ];
        
        me.columnB = [
            {