ui: hide rrd chart for io delay if no io_ticks are returned
it makes no sense to show a completely empty graph Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
f27b6086b1
commit
64c075b6c2
@ -234,6 +234,8 @@ Ext.define('PBS.DataStoreSummary', {
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxRRDChart',
|
||||
itemId: 'ioDelayChart',
|
||||
hidden: true,
|
||||
title: gettext('IO Delay (ms)'),
|
||||
fields: ['io_delay'],
|
||||
fieldTitles: [gettext('IO Delay')],
|
||||
@ -288,6 +290,10 @@ Ext.define('PBS.DataStoreSummary', {
|
||||
},
|
||||
});
|
||||
|
||||
me.mon(me.rrdstore, 'load', function(store, records, success) {
|
||||
me.down('#ioDelayChart').setVisible(!success || records[0]?.data?.io_ticks !== undefined);
|
||||
}, undefined, { single: true });
|
||||
|
||||
me.query('proxmoxRRDChart').forEach((chart) => {
|
||||
chart.setStore(me.rrdstore);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user