Fix multiple loading of build logs in new superuser panel

Also adds an error message if the logs fail to load
This commit is contained in:
Joseph Schorr 2017-01-30 13:56:53 -05:00
parent 8a842d286f
commit fcdf966c9f
3 changed files with 17 additions and 10 deletions

View file

@ -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();
};