'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;
},
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);
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);
},