diff --git a/.travis.yml b/.travis.yml index 7bbc434..43393e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,4 @@ script: - tox env: - TOXENV=flake8 - - TOXENV=py26 - TOXENV=py27 diff --git a/app/static/js/ceph.dash.js b/app/static/js/ceph.dash.js index be245fd..3ddf240 100644 --- a/app/static/js/ceph.dash.js +++ b/app/static/js/ceph.dash.js @@ -309,15 +309,24 @@ $(function () { // *overall status* clusterStatusOverall = data['health']['overall_status']; - clusterHealthSummary = data['health']['summary']; + if (data['health']['status'] || false) { + clusterStatusOverall = data['health']['status']; + } + clusterHealthSummary = []; + if (data['health']['summary'] || false) { + $.each(data['health']['summary'], function(index, check) { + clusterHealthSummary.push(check['summary']); + }); + } + if (data['health']['checks'] || false) { + $.each(data['health']['checks'], function(index, check) { + clusterHealthSummary.push(check['summary']['message']); + }); + } // *monitor state* monmapMons = data['monmap']['mons']; - if (monmapMons.length > 1) { - timechekMons = data['health']['timechecks']['mons']; - } else { - timechekMons = data['health']['health']['health_services'][0]['mons']; - } + quorumMons = data['quorum_names']; // }}} // Update Content {{{ @@ -414,7 +423,7 @@ $(function () { // update overall cluster status details $("#overall_status").append(''); @@ -422,11 +431,9 @@ $(function () { $("#monitor_status").empty(); $.each(monmapMons, function(index, mon) { health = 'HEALTH_ERR' - $.each(timechekMons, function(index, mon_health) { - if (mon['name'] == mon_health['name']) { - health = mon_health['health']; - } - }); + if (quorumMons.includes(mon['name'])) { + health = 'HEALTH_OK'; + } msg = 'Monitor ' + mon['name'].toUpperCase() + ': ' + health; $("#monitor_status").append('
' + message(ceph2bootstrap[health], msg) + '
'); }); diff --git a/tox.ini b/tox.ini index b6ea575..2e7d3e6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 1.6 skipsdist = True -envlist = flake8, py26, py27 +envlist = flake8, py27 [testenv] setenv = VIRTUAL_ENV={envdir}