from pve-manager Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> --- src/Utils.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
diff --git a/src/Utils.js b/src/Utils.js index b5b1acb..d959dee 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -740,6 +740,31 @@ utilities: { return Ext.Date.format(servertime, 'Y-m-d H:i:s'); }, + render_zfs_health: function(value) { + if (typeof value === 'undefined') { + return ""; + } + 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; + }, + get_help_info: function(section) { let helpMap; if (typeof proxmoxOnlineHelpInfo !== 'undefined') { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel