diff --git a/static/directives/build-logs-view.html b/static/directives/build-logs-view.html index 285a8b141..bb6997c97 100644 --- a/static/directives/build-logs-view.html +++ b/static/directives/build-logs-view.html @@ -5,7 +5,9 @@ <span class="cor-loader" ng-if="!logEntries"></span> - <span class="no-logs" ng-if="!logEntries.length">(Waiting for build to start)</span> + <span class="no-logs" ng-if="!logEntries.length && currentBuild.phase == 'waiting'"> + (Waiting for build to start) + </span> <div class="log-container" ng-class="container.type" ng-repeat="container in logEntries"> <div class="container-header" ng-class="container.type == 'phase' ? container.message : ''" diff --git a/static/js/directives/ui/build-logs-view.js b/static/js/directives/ui/build-logs-view.js index 1eeb2fbd4..a5f27552d 100644 --- a/static/js/directives/ui/build-logs-view.js +++ b/static/js/directives/ui/build-logs-view.js @@ -25,9 +25,9 @@ angular.module('quay').directive('buildLogsView', function () { $scope.currentParentEntry = null; $scope.logStartIndex = 0; $scope.buildLogsText = ''; + $scope.currentBuild = null; var pollChannel = null; - var currentBuild = null; var appendToTextLog = function(type, message) { if (type == 'phase') { @@ -80,7 +80,7 @@ angular.module('quay').directive('buildLogsView', function () { $scope.buildUpdated({'build': resp}); // Save the current build. - currentBuild = resp; + $scope.currentBuild = resp; // Load the updated logs for the build. var options = { @@ -92,6 +92,7 @@ angular.module('quay').directive('buildLogsView', function () { $scope.logStartIndex = processLogs(resp['logs'], resp['start'], resp['total']); // If the build status is an error, open the last two log entries. + var currentBuild = $scope.currentBuild; if (currentBuild['phase'] == 'error' && $scope.logEntries.length > 1) { var openLogEntries = function(entry) { if (entry.logs) {