]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
followup: network selector: reorder columns and adapt widths
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Jun 2019 09:46:20 +0000 (11:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 12 Jun 2019 11:03:25 +0000 (13:03 +0200)
and use format_boolean to render the active column
also hide the type column by default, it often is not too important,
and can be derived from the interface name, e.g., vmbrX -> bridge,
bondX -> bond, etc.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
form/NetworkSelector.js

index e6824b6c341d1ce10e2065f96fe1fc3fc8bec383..2a94bbdcb1f2f2109e7671082127fd19d5fb97e9 100644 (file)
@@ -94,36 +94,33 @@ Ext.define('Proxmox.form.NetworkSelector', {
     listConfig: {
        width: 600,
        columns: [
+           {
+
+               header: gettext('CIDR'),
+               dataIndex: 'cidr',
+               hideable: false,
+               flex: 1
+           },
            {
                header: gettext('Interface'),
-               sortable: true,
-               flex:1,
+               width: 90,
                dataIndex: 'iface'
            },
            {
                header: gettext('Active'),
-               sortable: true,
-               flex:1,
+               renderer: Proxmox.Utils.format_boolean,
+               width: 60,
                dataIndex: 'active'
            },
-           {
-
-               header: gettext('CIDR'),
-               dataIndex: 'cidr',
-               sortable: true,
-               hideable: false,
-               flex:1
-           },
            {
                header: gettext('Type'),
-               sortable: true,
-               flex:1,
+               width: 80,
+               hidden: true,
                dataIndex: 'type'
            },
            {
                header: gettext('Comment'),
-               sortable: true,
-               flex:1,
+               flex: 2,
                dataIndex: 'comments'
            }
        ]