followup: network selector: reorder columns and adapt widths

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>
This commit is contained in:
Thomas Lamprecht 2019-06-12 11:46:20 +02:00
parent 607c37efd1
commit ce8c5365c2

View File

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