Only show the "Waiting" message if we are actually waiting

This commit is contained in:
Joseph Schorr 2015-03-06 14:10:07 -05:00
parent 8662c3b693
commit 91ea6b5a45
2 changed files with 6 additions and 3 deletions

View file

@ -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 : ''"

View file

@ -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) {