diff --git a/static/directives/super-user-build-logs.html b/static/directives/super-user-build-logs.html
index 64a7415b5..a29b5aed7 100644
--- a/static/directives/super-user-build-logs.html
+++ b/static/directives/super-user-build-logs.html
@@ -9,10 +9,12 @@
Get Logs
-
+
diff --git a/static/js/directives/ui/build-logs-view.js b/static/js/directives/ui/build-logs-view.js
index e37da1dce..e46fe6112 100644
--- a/static/js/directives/ui/build-logs-view.js
+++ b/static/js/directives/ui/build-logs-view.js
@@ -164,6 +164,10 @@ angular.module('quay').directive('buildLogsView', function () {
getBuildStatusAndLogs(build, callback);
};
+ // Make sure to cancel any existing watchers first.
+ stopWatching();
+
+ // Register a new poll channel to start watching.
$scope.pollChannel = AngularPollChannel.create($scope, conductStatusAndLogRequest, 5 * 1000 /* 5s */);
$scope.pollChannel.start();
};
diff --git a/static/js/directives/ui/super-user-build-logs.js b/static/js/directives/ui/super-user-build-logs.js
index aa1e3b7f1..8e69c4556 100644
--- a/static/js/directives/ui/super-user-build-logs.js
+++ b/static/js/directives/ui/super-user-build-logs.js
@@ -14,17 +14,18 @@ angular.module('quay').directive('superUserBuildLogs', function () {
controller: function ($scope, $element, ApiService) {
$scope.buildParams = {};
$scope.showLogTimestamps = true;
+ $scope.buildId = null;
+
$scope.loadBuild = function () {
var params = {
'build_uuid': $scope.buildParams.buildUuid
};
- ApiService.getRepoBuildSuperUserAsResource(params).get(function (build) {
+
+ $scope.buildId = $scope.buildParams.buildUuid;
+ $scope.buildResource = ApiService.getRepoBuildSuperUserAsResource(params).get(function (build) {
$scope.build = build;
});
};
- $scope.setUpdatedBuild = function (build) {
- $scope.build = build;
- };
}
};
return directiveDefinitionObject;