Only reload the view when canceling the timer if a build recently finished.

This commit is contained in:
jakedt 2014-03-05 16:50:32 -05:00
parent 63bfde1036
commit a633fa47aa

View file

@ -696,6 +696,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
} }
} }
var existingBuilds = $scope.runningBuilds || [];
$scope.runningBuilds = runningBuilds; $scope.runningBuilds = runningBuilds;
$scope.buildHistory = resp.builds; $scope.buildHistory = resp.builds;
@ -706,8 +707,10 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
// Mark the repo as no longer building. // Mark the repo as no longer building.
$scope.repo.is_building = false; $scope.repo.is_building = false;
// Reload the repo information. // Reload the repo information if all of the builds recently finished.
loadViewInfo(); if (existingBuilds.length > 0) {
loadViewInfo();
}
} }
}); });
}; };