]> git.proxmox.com Git - pve-manager.git/commitdiff
adapt render_ceph_health for luminous
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 20 Jul 2017 14:16:11 +0000 (16:16 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 24 Jul 2017 14:10:24 +0000 (16:10 +0200)
it is using 'status' instead of 'overall_health' now

also only give the health object now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/Utils.js
www/manager6/ceph/Status.js
www/manager6/dc/Health.js

index 78683e0cfe9995439e19f1236e56b651feb5235d..0b85097704fa66c511c1161bb06b6cd84d6c80db 100644 (file)
@@ -106,20 +106,20 @@ Ext.define('PVE.Utils', { utilities: {
        'HEALTH_ERR':'critical'
     },
 
-    render_ceph_health: function(record) {
+    render_ceph_health: function(healthObj) {
        var state = {
            iconCls: PVE.Utils.get_health_icon(),
            text: ''
        };
 
-       if (!record || !record.data) {
+       if (!healthObj || !healthObj.status) {
            return state;
        }
 
-       var health = PVE.Utils.map_ceph_health[record.data.health.overall_status];
+       var health = PVE.Utils.map_ceph_health[healthObj.status];
 
        state.iconCls = PVE.Utils.get_health_icon(health, true);
-       state.text = record.data.health.overall_status;
+       state.text = healthObj.status;
 
        return state;
     },
index dc45dbee86ace13b395572c781993f4bf9240501..b339d9305f55e3e4cf84726b523d49c10df74718 100644 (file)
@@ -148,7 +148,7 @@ Ext.define('PVE.node.CephStatus', {
        var rec = records[0];
 
        // add health panel
-       me.down('#overallhealth').updateHealth(PVE.Utils.render_ceph_health(rec));
+       me.down('#overallhealth').updateHealth(PVE.Utils.render_ceph_health(rec.data.health || {}));
        // add errors to gridstore
        me.down('#warnings').getStore().loadRawData(rec.data.health.summary, false);
 
index a0ac7f14d1acf7ffafd8e00631e00bcd66219076..3e336a1b2beb87f61399eda4ebd934863376c5b6 100644 (file)
@@ -89,7 +89,7 @@ Ext.define('PVE.dc.Health', {
 
        me.cepherrors = 0;
 
-       var state = PVE.Utils.render_ceph_health(records[0]);
+       var state = PVE.Utils.render_ceph_health(records[0].data.health || {});
        cephstatus.updateHealth(state);
        cephstatus.setVisible(true);
     },