Skip to content

Commit

Permalink
Merge pull request #55 from Crapworks/luminous
Browse files Browse the repository at this point in the history
Luminous
  • Loading branch information
Crapworks authored Nov 7, 2017
2 parents 5039230 + 2e05a89 commit c41a2d8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ script:
- tox
env:
- TOXENV=flake8
- TOXENV=py26
- TOXENV=py27
31 changes: 19 additions & 12 deletions app/static/js/ceph.dash.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {{{
Expand Down Expand Up @@ -414,19 +423,17 @@ $(function () {
// update overall cluster status details
$("#overall_status").append('<ul class="list-group">');
$.each(clusterHealthSummary, function(index, obj) {
$("#overall_status").append('<li class="list-group-item active"><span class="glyphicon glyphicon-flash"></span><strong>' + obj['summary'] + '</strong></li>');
$("#overall_status").append('<li class="list-group-item active"><span class="glyphicon glyphicon-flash"></span><strong>' + obj + '</strong></li>');
});
$("#overall_status").append('</ul>');

// update monitor status
$("#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('<div class="col-md-4">' + message(ceph2bootstrap[health], msg) + '</div>');
});
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipsdist = True
envlist = flake8, py26, py27
envlist = flake8, py27

[testenv]
setenv = VIRTUAL_ENV={envdir}
Expand Down

0 comments on commit c41a2d8

Please sign in to comment.