Skip to content

Commit

Permalink
feat(dashboard): add ">= WARN" to the alarm donut
Browse files Browse the repository at this point in the history
...just to make it clear why the color and/or number of alarms
might not match the alarms you can see when you click-through
to the alarm list.
  • Loading branch information
Benjamin Reed committed Apr 11, 2017
1 parent 69340ca commit c00d187
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion scss/includes/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $shadow-color: rgba(0,0,0,0.3);
}
.donut-title {
z-index: $z-index-view-above;
margin-top: -($font-size-large * 1.6);
margin-top: -($font-size-large * 1.5);
font-size: $font-size-large * 2;
left:0;
width: 100%;
Expand All @@ -23,6 +23,12 @@ $shadow-color: rgba(0,0,0,0.3);
font-size: $font-size-base;
}
}

/* bump the alarms title up a little bit because it's 2 lines */
.alarms .donut-title {
margin-top: -($font-size-large * 2.0);
}

.donut-title {
top: 50%;
position: absolute;
Expand Down
7 changes: 6 additions & 1 deletion src/app/dashboard/DashboardController.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
var favoriteGraphsTemplate = require('ngtemplate!./dashboard-favorite-graphs.html');
var availabilityTemplate = require('ngtemplate!./dashboard-availability.html');

var types = {
outages: 'Outages',
alarms: 'Alarms<br>(>= WARN)'
};

var severityOrder = [
'INDETERMINATE',
'CLEARED',
Expand Down Expand Up @@ -213,7 +218,7 @@
visible.text('');
} else {
var html = '<div class="row total"><div class="col">' + total + '</div></div>' +
'<div class="row type"><div class="col">' + type + '</div></div>';
'<div class="row type"><div class="col">' + types[type] + '</div></div>';
visible.html(html);
visible.show();
}
Expand Down

0 comments on commit c00d187

Please sign in to comment.