Show a spinner when loading the build info

This commit is contained in:
Joseph Schorr 2014-03-05 18:13:04 -05:00
parent 9f2841d40b
commit a9f70c6e3a
2 changed files with 8 additions and 2 deletions

View file

@ -940,7 +940,7 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
} }
}); });
$scope.builds = []; $scope.builds = null;
$scope.polling = false; $scope.polling = false;
$scope.buildDialogShowCounter = 0; $scope.buildDialogShowCounter = 0;
@ -1004,6 +1004,8 @@ function RepoBuildCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
}; };
$scope.setCurrentBuild = function(buildId, opt_updateURL) { $scope.setCurrentBuild = function(buildId, opt_updateURL) {
if (!$scope.builds) { return; }
// Find the build. // Find the build.
for (var i = 0; i < $scope.builds.length; ++i) { for (var i = 0; i < $scope.builds.length; ++i) {
if ($scope.builds[i].id == buildId) { if ($scope.builds[i].id == buildId) {

View file

@ -18,7 +18,11 @@
</div> </div>
</div> </div>
<div class="row" ng-show="!builds.length"> <div class="row" ng-show="!builds">
<div class="quay-spinner"></div>
</div>
<div class="row" ng-show="builds && !builds.length">
There are no builds for this repository There are no builds for this repository
</div> </div>