]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/Utils.js
gui: ceph: add get_ceph_icon_html to utils
[pve-manager.git] / www / manager6 / Utils.js
index 87457078400af1201e962ee65f06534ace775627..a159445bc7e8bc384b3cc955449285fb38bc2d8f 100644 (file)
@@ -102,6 +102,15 @@ Ext.define('PVE.Utils', { utilities: {
        return icon;
     },
 
+    get_ceph_icon_html: function(health, fw) {
+       var state = PVE.Utils.map_ceph_health[health];
+       var cls = PVE.Utils.get_health_icon(state);
+       if (fw) {
+           cls += ' fa-fw';
+       }
+       return "<i class='fa " + cls + "'></i> ";
+    },
+
     map_ceph_health: {
        'HEALTH_OK':'good',
        'HEALTH_OLD':'old',