mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-10 07:55:39 +00:00
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:
parent
84caf265bd
commit
dfe6d184ff
@ -106,20 +106,20 @@ Ext.define('PVE.Utils', { utilities: {
|
|||||||
'HEALTH_ERR':'critical'
|
'HEALTH_ERR':'critical'
|
||||||
},
|
},
|
||||||
|
|
||||||
render_ceph_health: function(record) {
|
render_ceph_health: function(healthObj) {
|
||||||
var state = {
|
var state = {
|
||||||
iconCls: PVE.Utils.get_health_icon(),
|
iconCls: PVE.Utils.get_health_icon(),
|
||||||
text: ''
|
text: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!record || !record.data) {
|
if (!healthObj || !healthObj.status) {
|
||||||
return state;
|
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.iconCls = PVE.Utils.get_health_icon(health, true);
|
||||||
state.text = record.data.health.overall_status;
|
state.text = healthObj.status;
|
||||||
|
|
||||||
return state;
|
return state;
|
||||||
},
|
},
|
||||||
|
@ -148,7 +148,7 @@ Ext.define('PVE.node.CephStatus', {
|
|||||||
var rec = records[0];
|
var rec = records[0];
|
||||||
|
|
||||||
// add health panel
|
// 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
|
// add errors to gridstore
|
||||||
me.down('#warnings').getStore().loadRawData(rec.data.health.summary, false);
|
me.down('#warnings').getStore().loadRawData(rec.data.health.summary, false);
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ Ext.define('PVE.dc.Health', {
|
|||||||
|
|
||||||
me.cepherrors = 0;
|
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.updateHealth(state);
|
||||||
cephstatus.setVisible(true);
|
cephstatus.setVisible(true);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user