mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 18:01:02 +00:00
Build steps fix
This commit is contained in:
parent
63408147b2
commit
13b1ab9fd0
7 changed files with 41 additions and 41 deletions
BIN
cmd/drone-server/drone-server
Executable file
BIN
cmd/drone-server/drone-server
Executable file
Binary file not shown.
|
@ -98,7 +98,6 @@
|
|||
});
|
||||
|
||||
$scope.restart = function () {
|
||||
console.log('restart');
|
||||
builds.restart(fullName, number).then(function (payload) {
|
||||
$scope.build = payload.data;
|
||||
}).catch(function (err) {
|
||||
|
@ -191,8 +190,26 @@
|
|||
$scope.error = err;
|
||||
});
|
||||
|
||||
repos.subscribe(fullName, function (event) {
|
||||
if (event.number !== parseInt(number)) {
|
||||
return; // ignore
|
||||
}
|
||||
// update the build
|
||||
$scope.build = event;
|
||||
console.log(event.builds);
|
||||
$scope.task = event.builds[step - 1];
|
||||
$scope.$apply();
|
||||
|
||||
// start streaming the current build
|
||||
if ($scope.task.status === 'running') {
|
||||
stream();
|
||||
} else {
|
||||
// resets our streaming state
|
||||
streaming = false;
|
||||
}
|
||||
});
|
||||
|
||||
$scope.restart = function () {
|
||||
console.log('restart');
|
||||
builds.restart(fullName, number).then(function (payload) {
|
||||
$scope.build = payload.data;
|
||||
$scope.task = payload.data.builds[step - 1];
|
||||
|
@ -213,24 +230,6 @@
|
|||
$scope.tail = function () {
|
||||
tail = !tail;
|
||||
};
|
||||
|
||||
repos.subscribe(fullName, function (event) {
|
||||
if (event.number !== parseInt(number)) {
|
||||
return; // ignore
|
||||
}
|
||||
// update the build
|
||||
$scope.build = event;
|
||||
$scope.task = event.builds[step - 1];
|
||||
$scope.$apply();
|
||||
|
||||
// start streaming the current build
|
||||
if ($scope.task.status === 'running') {
|
||||
stream();
|
||||
} else {
|
||||
// resets our streaming state
|
||||
streaming = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
angular
|
||||
|
|
|
@ -188,7 +188,7 @@
|
|||
},
|
||||
title: 'Build'
|
||||
})
|
||||
.state('app.build_step', {
|
||||
.state('app.job', {
|
||||
url: '/:owner/:name/:number/:step',
|
||||
views: {
|
||||
'toolbar': {
|
||||
|
@ -200,7 +200,8 @@
|
|||
templateUrl: '/static/scripts/views/builds/step/content.html',
|
||||
controller: 'BuildOutCtrl',
|
||||
resolve: resolveUser
|
||||
}
|
||||
},
|
||||
title: 'Build Job'
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<article>
|
||||
<section>
|
||||
<a class="row build-row" ng-repeat="build in builds | orderBy:'-number'"
|
||||
ng-href="/{{ repo.full_name }}/{{ build.number }}">
|
||||
<a class="row build-row" ng-repeat="build in builds | orderBy:'-number'" ng-href="/{{ repo.full_name }}/{{ build.number }}">
|
||||
<div>
|
||||
<div ng-class="[ 'build-num', build.status ]"></div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>{{ build.head_commit.message }}</h3>
|
||||
|
||||
<p><strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch
|
||||
}}</strong> {{ build.started_at | fromNow }}</p>
|
||||
<p>
|
||||
<strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch}}</strong> {{ build.started_at | fromNow }}
|
||||
</p>
|
||||
|
||||
<div style="position:absolute;top:30px;right:30px;color:#CCC;"># {{build.number}}</div>
|
||||
</div>
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
<div>
|
||||
<h3>{{ build.head_commit.message }}</h3>
|
||||
|
||||
<p><strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch
|
||||
}}</strong> {{ build.started_at | fromNow }}</p>
|
||||
<p><strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch}}</strong> {{ build.started_at | fromNow }}</p>
|
||||
|
||||
<div style="position:absolute;top:30px;right:30px;color:#CCC;"># {{build.number}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<p style="padding-top: 20px;">
|
||||
<h3><strong>Build jobs</strong></h3>
|
||||
</p>
|
||||
<section>
|
||||
<a class="row build-row sub-build-row" ng-repeat="job in build.jobs"
|
||||
ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}">
|
||||
<a class="row build-row sub-build-row" ng-repeat="job in build.jobs" ng-href="{{ repo.full_name }}/{{ build.number }}/{{ job.number }}">
|
||||
<div>
|
||||
<div ng-class="[ 'build-num', build.status ]"></div>
|
||||
</div>
|
||||
|
@ -34,6 +34,7 @@
|
|||
</section>
|
||||
</article>
|
||||
|
||||
|
||||
<button ng-if="build.status !== 'pending' && build.status !== 'running'" ng-click="restart()">Restart</button>
|
||||
<button ng-if="build.status === 'pending' || build.status === 'running'" ng-click="cancel()">Cancel</button>
|
||||
<div style="padding-left: 20px;">
|
||||
<button ng-if="build.status !== 'pending' && build.status !== 'running'" ng-click="restart()">Restart</button>
|
||||
<button ng-if="build.status === 'pending' || build.status === 'running'" ng-click="cancel()">Cancel</button>
|
||||
</div>
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
<div>
|
||||
<h3>{{ build.head_commit.message }}</h3>
|
||||
|
||||
<p><strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch
|
||||
}}</strong> {{ build.started_at | fromNow }}</p>
|
||||
<p><strong>{{ build.head_commit.author.login }}</strong> pushed to <strong>{{ build.head_commit.branch}}</strong> {{ build.started_at | fromNow }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<i class="material-icons md-18">home</i>
|
||||
</a>
|
||||
<a ng-href="/{{ repo.full_name }}">{{ repo.owner }} / {{ repo.name }}</a>
|
||||
<span class="spacer"> </span>
|
||||
<a ng-href="/{{ repo.full_name }}/{{ build.number }}">Build # {{ build.number }}</a>
|
||||
<span class="spacer"></span>
|
||||
<a ng-href="/{{ repo.full_name }}/{{ build.sequence }}">{{ build.sequence }}</a>
|
||||
<span class="spacer"></span>
|
||||
<a href="#">{{ task.sequence }}</a>
|
||||
<a href="#">Job #{{ task.number }}</a>
|
||||
</div>
|
||||
|
||||
<div class="menu">
|
||||
|
|
Loading…
Reference in a new issue