From 2b66abbfab51fda19cb89919b46ea7e1a74783b1 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 25 Jun 2020 10:45:51 +0200 Subject: [PATCH] ui: dashboard: use last value for holes in history graph it is only designed to be a quick overview, so having holes there is not really pretty and since we do not even show any date for the points, we can simply reuse the last value for holes the 'real' graph with holes is still available on the DataStoreStatistics panel Signed-off-by: Dominik Csapak --- www/dashboard/DataStoreStatistics.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/www/dashboard/DataStoreStatistics.js b/www/dashboard/DataStoreStatistics.js index 6736e616..c71f13c2 100644 --- a/www/dashboard/DataStoreStatistics.js +++ b/www/dashboard/DataStoreStatistics.js @@ -2,7 +2,19 @@ Ext.define('pbs-datastore-statistics', { extend: 'Ext.data.Model', fields: [ - 'store', 'total', 'used', 'avail', 'estimated-full-date', 'history', + 'store', 'total', 'used', 'avail', 'estimated-full-date', + { + name: 'history', + convert: function(values) { + let last = null; + return values.map(v => { + if (v !== undefined && v !== null) { + last = v; + } + return last; + }); + } + }, { name: 'usage', calculate: function(data) {