mark active job in list

This commit is contained in:
Brad Rydzewski 2015-08-09 20:52:08 -07:00
parent 819fa9db87
commit c1d18b65bb
3 changed files with 11 additions and 2 deletions

View file

@ -71,6 +71,7 @@
var owner = $stateParams.owner;
var name = $stateParams.name;
var fullName = owner + '/' + name;
var step = parseInt($stateParams.step) || 1;
// Gets the currently authenticated user
users.getCached().then(function (payload) {
@ -86,6 +87,7 @@
// Gets the build
builds.get(fullName, number).then(function (payload) {
$scope.step = step;
$scope.build = payload.data;
}).catch(function (err) {
$scope.error = err;
@ -172,6 +174,7 @@
builds.get(fullName, number).then(function (payload) {
$scope.build = payload.data;
$scope.task = payload.data.jobs[step - 1];
$scope.step = step;
if (['pending', 'killed'].indexOf($scope.task.status) !== -1) {
// do nothing

View file

@ -12,8 +12,8 @@
</div>
</div>
<div class="list job-list">
<a ng-repeat="job in build.jobs" ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}">
<div ng-class="{'list':true, 'job-list':true, 'matrix-list': build.jobs && build.jobs.length > 1 }">
<a ng-repeat="job in build.jobs" ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}" ng-class="{'active': job.number == step }">
<div>
<div class="status {{ job.status }} status-small">
<i class="material-icons">{{ job.status | icon }}</i>

View file

@ -75,3 +75,9 @@
.list em {
color:#65737e;
}
.matrix-list a.active {
background-color: #eff1f5;
margin-left: -10px;
padding-left: 10px;
}