adapt render_ceph_health for luminous

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>
This commit is contained in:
Dominik Csapak 2017-07-20 16:16:11 +02:00 committed by Wolfgang Bumiller
parent 84caf265bd
commit dfe6d184ff
3 changed files with 6 additions and 6 deletions

View 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;
},

View 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);

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