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) {
|
||||
|
||||
var step = parseInt($routeParams.step);
|
||||
var step = parseInt($routeParams.step) || 1;
|
||||
var number = $routeParams.number;
|
||||
var owner = $routeParams.owner;
|
||||
var name = $routeParams.name;
|
||||
|
@ -110,17 +110,6 @@
|
|||
// Gets the build
|
||||
builds.get(fullName, number).then(function(payload){
|
||||
$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];
|
||||
|
||||
if (['pending', 'killed'].indexOf($scope.task.state) !== -1) {
|
||||
|
|
|
@ -30,10 +30,8 @@
|
|||
</div>
|
||||
|
||||
</section>
|
||||
<section>
|
||||
<pre id="term" ng-if="task && task.state !== 'pending'">{{ logs }}</pre>
|
||||
</section>
|
||||
<section ng-if="build.builds.length === 1 || !task">
|
||||
|
||||
<section ng-if="build.builds.length > 1">
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -59,6 +57,11 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
</main>
|
||||
|
|
Loading…
Reference in a new issue