in luminous, the output of the status/health has changed (again),
so we have to access the correct properties

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 www/manager6/ceph/Status.js       | 10 ++++++++--
 www/manager6/ceph/StatusDetail.js |  8 +++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/www/manager6/ceph/Status.js b/www/manager6/ceph/Status.js
index 132c5e0a..60260ed2 100644
--- a/www/manager6/ceph/Status.js
+++ b/www/manager6/ceph/Status.js
@@ -178,8 +178,14 @@ Ext.define('PVE.node.CephStatus', {
            var details = checks[key].detail || [];
            result.push({
                id: key,
-               summary: checks[key].message,
-               detail: details.join("<br>\n"),
+               summary: checks[key].summary.message,
+               detail: Ext.Array.reduce(
+                           checks[key].detail,
+                           function(first, second) {
+                               return first + '\n' + second.message;
+                           },
+                           ''
+                       ),
                severity: checks[key].severity
            });
        });
diff --git a/www/manager6/ceph/StatusDetail.js 
b/www/manager6/ceph/StatusDetail.js
index 0f140294..5373e2d5 100644
--- a/www/manager6/ceph/StatusDetail.js
+++ b/www/manager6/ceph/StatusDetail.js
@@ -105,7 +105,7 @@ Ext.define('PVE.ceph.StatusDetail', {
        Ext.Object.each(health.checks, function(key, value, obj) {
            var found = null;
            if (key === 'OSD_DOWN') {
-               found = value.message.match(downinregex);
+               found = value.summary.message.match(downinregex);
                if (found !== null) {
                    downin_osds = parseInt(found[1],10);
                }
@@ -114,13 +114,15 @@ Ext.define('PVE.ceph.StatusDetail', {
                if (!value.detail) {
                    return;
                }
-               found = value.detail[0].match(monnameregex);
+               found = value.detail[0].message.match(monnameregex);
                if (found !== null) {
                    if (!monmsgs[found[1]]) {
                        monmsgs[found[1]] = [];
                    }
                    monmsgs[found[1]].push({
-                       text: value.detail.join("\n"),
+                       text: Ext.Array.reduce(value.detail, function(first, 
second) {
+                           return first + '\n' + second.message;
+                       }, ''),
                        severity: value.severity
                    });
                }
-- 
2.11.0


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to