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 <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-06-25 10:45:51 +02:00 committed by Dietmar Maurer
parent 402c8861d8
commit 2b66abbfab

View File

@ -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) {