From d14512c82ddef85e56d3b4d2f0f78b2dbde1e74e Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 17 May 2022 09:00:38 +0200 Subject: [PATCH] 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 Signed-off-by: Thomas Lamprecht --- www/datastore/Summary.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/datastore/Summary.js b/www/datastore/Summary.js index 328aa561..cb220826 100644 --- a/www/datastore/Summary.js +++ b/www/datastore/Summary.js @@ -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) => {