]> git.proxmox.com Git - proxmox-backup.git/blobdiff - www/dashboard/DataStoreStatistics.js
ui: dashboard: use last value for holes in history graph
[proxmox-backup.git] / www / dashboard / DataStoreStatistics.js
index 6736e616fdba1ba9d0048aef452d8a945dbd655e..c71f13c2a50e76427896ca163439c7bd76cee3e4 100644 (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) {