From af39c399bce2459ee61a62bc6c40bcafab16641a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 21 May 2021 13:21:46 +0200 Subject: [PATCH] ui: dashboards statistics: visualize datastores where quering the usage failed Signed-off-by: Thomas Lamprecht --- www/dashboard/DataStoreStatistics.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/www/dashboard/DataStoreStatistics.js b/www/dashboard/DataStoreStatistics.js index 44c2089b..61375e2b 100644 --- a/www/dashboard/DataStoreStatistics.js +++ b/www/dashboard/DataStoreStatistics.js @@ -2,7 +2,12 @@ Ext.define('pbs-datastore-statistics', { extend: 'Ext.data.Model', fields: [ - 'store', 'total', 'used', 'avail', 'estimated-full-date', + 'store', + 'total', + 'used', + 'avail', + 'estimated-full-date', + 'error', { name: 'history', convert: function(values) { @@ -60,6 +65,15 @@ Ext.define('PBS.DatastoreStatistics', { text: gettext('Name'), dataIndex: 'store', sortable: true, + renderer: (value, metaData, record, rowIndex, colIndex, store) => { + let err = record.get('error'); + if (err) { + metaData.tdAttr = `data-qtip="${Ext.htmlEncode(err)}"`; + metaData.tdCls = 'proxmox-invalid-row'; + return `${value || ''} `; + } + return value; + }, }, { text: gettext('Size'),