added a check for a undefined value, because some rows don't have a state e.g. without this check, there would be a ? followed by undefined.
Signed-off-by: Tim Marx <[email protected]> --- www/manager6/Utils.js | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 568ceb7b..006ad36e 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -123,24 +123,27 @@ Ext.define('PVE.Utils', { utilities: { }, render_zfs_health: function(value) { - var iconCls = 'question-circle'; - switch (value) { - case 'ONLINE': - iconCls = 'check-circle good'; - break; - case 'REMOVED': - case 'DEGRADED': - iconCls = 'exclamation-circle warning'; - break; - case 'UNAVAIL': - case 'FAULTED': - case 'OFFLINE': - iconCls = 'times-circle critical'; - break; - default: //unknown - } + if (typeof value != 'undefined'){ + var iconCls = 'question-circle'; + switch (value) { + case 'AVAIL': + case 'ONLINE': + iconCls = 'check-circle good'; + break; + case 'REMOVED': + case 'DEGRADED': + iconCls = 'exclamation-circle warning'; + break; + case 'UNAVAIL': + case 'FAULTED': + case 'OFFLINE': + iconCls = 'times-circle critical'; + break; + default: //unknown + } - return '<i class="fa fa-' + iconCls + '"></i> ' + value; + return '<i class="fa fa-' + iconCls + '"></i> ' + value; + } }, get_kvm_osinfo: function(value) { -- 2.11.0 _______________________________________________ pve-devel mailing list [email protected] https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
