From 7762ecac90842e2b32f222c69b5b0e7db3bc5320 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Mon, 11 May 2015 00:53:56 -0700 Subject: [PATCH] always display sub-build list --- server/static/scripts/controllers/builds.js | 13 +------------ server/static/scripts/views/build.html | 11 +++++++---- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/server/static/scripts/controllers/builds.js b/server/static/scripts/controllers/builds.js index 617823e5..3f73ae93 100644 --- a/server/static/scripts/controllers/builds.js +++ b/server/static/scripts/controllers/builds.js @@ -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) { diff --git a/server/static/scripts/views/build.html b/server/static/scripts/views/build.html index 804a0b95..c22adda6 100644 --- a/server/static/scripts/views/build.html +++ b/server/static/scripts/views/build.html @@ -30,10 +30,8 @@ -
-
{{ logs }}
-
-
+ +
@@ -59,6 +57,11 @@
+ +
+
{{ logs }}
+
+