mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 08:56:29 +00:00
always display sub-build list
This commit is contained in:
parent
85256d3a22
commit
7762ecac90
2 changed files with 8 additions and 16 deletions
|
@ -66,7 +66,7 @@
|
||||||
*/
|
*/
|
||||||
function BuildCtrl($scope, $routeParams, $window, logs, builds, repos, users) {
|
function BuildCtrl($scope, $routeParams, $window, logs, builds, repos, users) {
|
||||||
|
|
||||||
var step = parseInt($routeParams.step);
|
var step = parseInt($routeParams.step) || 1;
|
||||||
var number = $routeParams.number;
|
var number = $routeParams.number;
|
||||||
var owner = $routeParams.owner;
|
var owner = $routeParams.owner;
|
||||||
var name = $routeParams.name;
|
var name = $routeParams.name;
|
||||||
|
@ -110,17 +110,6 @@
|
||||||
// Gets the build
|
// Gets the build
|
||||||
builds.get(fullName, number).then(function(payload){
|
builds.get(fullName, number).then(function(payload){
|
||||||
$scope.build = payload.data;
|
$scope.build = payload.data;
|
||||||
|
|
||||||
// if only 1 build, select first
|
|
||||||
if (!step && payload.data.builds.length === 1) {
|
|
||||||
step = 1;
|
|
||||||
|
|
||||||
// else if only 1 step, but multiple builds
|
|
||||||
// we should only render the list of builds
|
|
||||||
} else if (!step) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.task = payload.data.builds[step-1];
|
$scope.task = payload.data.builds[step-1];
|
||||||
|
|
||||||
if (['pending', 'killed'].indexOf($scope.task.state) !== -1) {
|
if (['pending', 'killed'].indexOf($scope.task.state) !== -1) {
|
||||||
|
|
|
@ -30,10 +30,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<section>
|
|
||||||
<pre id="term" ng-if="task && task.state !== 'pending'">{{ logs }}</pre>
|
<section ng-if="build.builds.length > 1">
|
||||||
</section>
|
|
||||||
<section ng-if="build.builds.length === 1 || !task">
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -59,6 +57,11 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<pre id="term" ng-if="task && task.state !== 'pending'">{{ logs }}</pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<button class="fab" ng-if="build.state === 'running'" ng-click="tail()"></button>
|
<button class="fab" ng-if="build.state === 'running'" ng-click="tail()"></button>
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in a new issue