From a9f70c6e3a9194fbf6fbeeaef559c3fa1a137331 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 5 Mar 2014 18:13:04 -0500 Subject: [PATCH] Show a spinner when loading the build info --- static/js/controllers.js | 4 +++- static/partials/repo-build.html | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index 5a53be0de..936886fc5 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -940,7 +940,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope } }); - $scope.builds = []; + $scope.builds = null; $scope.polling = false; $scope.buildDialogShowCounter = 0; @@ -1004,6 +1004,8 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope }; $scope.setCurrentBuild = function(buildId, opt_updateURL) { + if (!$scope.builds) { return; } + // Find the build. for (var i = 0; i < $scope.builds.length; ++i) { if ($scope.builds[i].id == buildId) { diff --git a/static/partials/repo-build.html b/static/partials/repo-build.html index 4ff47b487..f7aec4838 100644 --- a/static/partials/repo-build.html +++ b/static/partials/repo-build.html @@ -18,7 +18,11 @@ -
+
+
+
+ +
There are no builds for this repository