ui: traffic-control view: tune column width, add more flex

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-11-20 22:32:02 +01:00
parent e7acdde758
commit ebf8ce20bc
1 changed files with 11 additions and 8 deletions

View File

@ -113,14 +113,14 @@ Ext.define('PBS.config.TrafficControlView', {
columns: [ columns: [
{ {
header: gettext('Rule'), header: gettext('Rule'),
width: 200, width: 120,
sortable: true, sortable: true,
renderer: Ext.String.htmlEncode, renderer: Ext.String.htmlEncode,
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
header: gettext('Rate In'), header: gettext('Rate In'),
width: 200, width: 120,
sortable: true, sortable: true,
renderer: 'render_bandwidth', renderer: 'render_bandwidth',
dataIndex: 'rate-in', dataIndex: 'rate-in',
@ -129,6 +129,8 @@ Ext.define('PBS.config.TrafficControlView', {
header: gettext('Rate In Used'), header: gettext('Rate In Used'),
xtype: 'widgetcolumn', xtype: 'widgetcolumn',
dataIndex: 'rateInUsed', dataIndex: 'rateInUsed',
//width: 200,
flex: 2,
widget: { widget: {
xtype: 'progressbarwidget', xtype: 'progressbarwidget',
textTpl: '{percent:number("0")}%', textTpl: '{percent:number("0")}%',
@ -137,7 +139,7 @@ Ext.define('PBS.config.TrafficControlView', {
}, },
{ {
header: gettext('Rate Out'), header: gettext('Rate Out'),
width: 200, width: 120,
sortable: true, sortable: true,
renderer: 'render_bandwidth', renderer: 'render_bandwidth',
dataIndex: 'rate-out', dataIndex: 'rate-out',
@ -146,6 +148,7 @@ Ext.define('PBS.config.TrafficControlView', {
header: gettext('Rate Out Used'), header: gettext('Rate Out Used'),
xtype: 'widgetcolumn', xtype: 'widgetcolumn',
dataIndex: 'rateOutUsed', dataIndex: 'rateOutUsed',
flex: 2,
widget: { widget: {
xtype: 'progressbarwidget', xtype: 'progressbarwidget',
textTpl: '{percent:number("0")}%', textTpl: '{percent:number("0")}%',
@ -154,21 +157,21 @@ Ext.define('PBS.config.TrafficControlView', {
}, },
{ {
header: gettext('Burst In'), header: gettext('Burst In'),
width: 200, width: 120,
sortable: true, sortable: true,
renderer: 'render_bandwidth', renderer: 'render_bandwidth',
dataIndex: 'burst-in', dataIndex: 'burst-in',
}, },
{ {
header: gettext('Burst Out'), header: gettext('Burst Out'),
width: 200, width: 120,
sortable: true, sortable: true,
renderer: 'render_bandwidth', renderer: 'render_bandwidth',
dataIndex: 'burst-out', dataIndex: 'burst-out',
}, },
{ {
header: gettext('Networks'), header: gettext('Networks'),
width: 200, flex: 3,
sortable: true, sortable: true,
renderer: Ext.String.htmlEncode, renderer: Ext.String.htmlEncode,
dataIndex: 'network', dataIndex: 'network',
@ -178,14 +181,14 @@ Ext.define('PBS.config.TrafficControlView', {
sortable: false, sortable: false,
renderer: tf => tf ? Ext.String.htmlEncode(tf.join('; ')) : '', renderer: tf => tf ? Ext.String.htmlEncode(tf.join('; ')) : '',
dataIndex: 'timeframe', dataIndex: 'timeframe',
width: 200, flex: 3,
}, },
{ {
header: gettext('Comment'), header: gettext('Comment'),
sortable: false, sortable: false,
renderer: Ext.String.htmlEncode, renderer: Ext.String.htmlEncode,
dataIndex: 'comment', dataIndex: 'comment',
flex: 1, flex: 2,
}, },
], ],
}); });