Skip to content

Commit

Permalink
feat: danger state whole row when failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ephigenia committed Dec 20, 2016
1 parent f18bdc8 commit 35f670b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions source/scripts/BuildListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@
bindToController: true,
controllerAs: '$ctrl',
templateUrl: 'scripts/buildListItem.html',
controller: function($filter) {
controller: function($filter, $element) {
var ctrl = this;

// @TODO when failed colorize the whole row

switch (ctrl.build.outcome) {
default:
break;
case 'failed':
$element.addClass('table-danger');
break;
}

Object.defineProperties(this, {
committerTitle: {
get: function() {
Expand All @@ -27,7 +35,7 @@
}
if (build.committer_date) {
title += ' ' + $filter('date')(build.committer_date, 'shortDate');
title += $filter('date')(build.committer_date, 'shortTime');
title += ' ' + $filter('date')(build.committer_date, 'shortTime');
}
return title;
}
Expand Down

0 comments on commit 35f670b

Please sign in to comment.