[pve-devel] [PATCH manager 2/5] adapt render_ceph_health for luminous
Dominik Csapak
d.csapak at proxmox.com
Thu Jul 20 16:16:11 CEST 2017
it is using 'status' instead of 'overall_health' now
also only give the health object now
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Utils.js | 8 ++++----
www/manager6/ceph/Status.js | 2 +-
www/manager6/dc/Health.js | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 78683e0c..0b850977 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -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;
},
diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index dc45dbee..b339d930 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -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);
diff --git a/www/manager6/dc/Health.js b/www/manager6/dc/Health.js
index a0ac7f14..3e336a1b 100644
--- a/www/manager6/dc/Health.js
+++ b/www/manager6/dc/Health.js
@@ -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);
},
--
2.11.0
More information about the pve-devel
mailing list