mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 15:41:01 +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'
|
||||
},
|
||||
|
||||
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;
|
||||
},
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user