mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
mark active job in list
This commit is contained in:
parent
819fa9db87
commit
c1d18b65bb
3 changed files with 11 additions and 2 deletions
|
@ -71,6 +71,7 @@
|
||||||
var owner = $stateParams.owner;
|
var owner = $stateParams.owner;
|
||||||
var name = $stateParams.name;
|
var name = $stateParams.name;
|
||||||
var fullName = owner + '/' + name;
|
var fullName = owner + '/' + name;
|
||||||
|
var step = parseInt($stateParams.step) || 1;
|
||||||
|
|
||||||
// Gets the currently authenticated user
|
// Gets the currently authenticated user
|
||||||
users.getCached().then(function (payload) {
|
users.getCached().then(function (payload) {
|
||||||
|
@ -86,6 +87,7 @@
|
||||||
|
|
||||||
// Gets the build
|
// Gets the build
|
||||||
builds.get(fullName, number).then(function (payload) {
|
builds.get(fullName, number).then(function (payload) {
|
||||||
|
$scope.step = step;
|
||||||
$scope.build = payload.data;
|
$scope.build = payload.data;
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
$scope.error = err;
|
$scope.error = err;
|
||||||
|
@ -172,6 +174,7 @@
|
||||||
builds.get(fullName, number).then(function (payload) {
|
builds.get(fullName, number).then(function (payload) {
|
||||||
$scope.build = payload.data;
|
$scope.build = payload.data;
|
||||||
$scope.task = payload.data.jobs[step - 1];
|
$scope.task = payload.data.jobs[step - 1];
|
||||||
|
$scope.step = step;
|
||||||
|
|
||||||
if (['pending', 'killed'].indexOf($scope.task.status) !== -1) {
|
if (['pending', 'killed'].indexOf($scope.task.status) !== -1) {
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list job-list">
|
<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 }}">
|
<a ng-repeat="job in build.jobs" ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}" ng-class="{'active': job.number == step }">
|
||||||
<div>
|
<div>
|
||||||
<div class="status {{ job.status }} status-small">
|
<div class="status {{ job.status }} status-small">
|
||||||
<i class="material-icons">{{ job.status | icon }}</i>
|
<i class="material-icons">{{ job.status | icon }}</i>
|
||||||
|
|
|
@ -75,3 +75,9 @@
|
||||||
.list em {
|
.list em {
|
||||||
color:#65737e;
|
color:#65737e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.matrix-list a.active {
|
||||||
|
background-color: #eff1f5;
|
||||||
|
margin-left: -10px;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue