ui: datastore/Summary: correctly show the io-delay chart

by checking if *any* record has data, not only the first
this would prevent the chart from being shown for e.g. newly added
datastores, or for datastores after the server was offline for some time

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-05-17 09:00:38 +02:00 committed by Thomas Lamprecht
parent e5cf0e3eda
commit d14512c82d
1 changed files with 2 additions and 1 deletions

View File

@ -310,7 +310,8 @@ Ext.define('PBS.DataStoreSummary', {
});
me.mon(me.rrdstore, 'load', function(store, records, success) {
me.down('#ioDelayChart').setVisible(!success || records[0]?.data?.io_ticks !== undefined);
let has_io_ticks = records.some((rec) => rec?.data?.io_ticks !== undefined);
me.down('#ioDelayChart').setVisible(!success || has_io_ticks);
}, undefined, { single: true });
me.query('proxmoxRRDChart').forEach((chart) => {