diff --git a/static/js/app.js b/static/js/app.js index 52a09174c..2b72f9930 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -2474,55 +2474,52 @@ quayApp.directive('buildStatus', function () { 'build': '=build' }, controller: function($scope, $element) { - $scope.getBuildProgress = function(buildInfo) { - switch (buildInfo.phase) { - case 'building': - return (buildInfo.status.current_command / buildInfo.status.total_commands) * 100; - break; - - case 'pushing': - return buildInfo.status.push_completion * 100; - break; - - case 'complete': - return 100; - break; - - case 'initializing': - case 'starting': - case 'waiting': - return 0; - break; - } + $scope.getBuildProgress = function(buildInfo) { + switch (buildInfo.phase) { + case 'building': + return (buildInfo.status.current_command / buildInfo.status.total_commands) * 100; + break; - return -1; - }; + case 'pushing': + return buildInfo.status.push_completion * 100; + break; - $scope.getBuildMessage = function(buildInfo) { - switch (buildInfo.phase) { - case 'initializing': - return 'Starting Dockerfile build'; - break; + case 'complete': + return 100; + break; - case 'starting': - case 'waiting': - case 'building': - return 'Building image from Dockerfile'; - break; + case 'initializing': + case 'starting': + case 'waiting': + return 0; + break; + } + + return -1; + }; - case 'pushing': - return 'Pushing image built from Dockerfile'; - break; + $scope.getBuildMessage = function(buildInfo) { + switch (buildInfo.phase) { + case 'starting': + case 'initializing': + return 'Starting Dockerfile build'; - case 'complete': - return 'Dockerfile build completed and pushed'; - break; - - case 'error': - return 'Dockerfile build failed.'; - break; - } - }; + case 'waiting': + return 'Waiting for available build worker.'; + + case 'building': + return 'Building image from Dockerfile'; + + case 'pushing': + return 'Pushing image built from Dockerfile'; + + case 'complete': + return 'Dockerfile build completed and pushed'; + + case 'error': + return 'Dockerfile build failed.'; + } + }; } }; return directiveDefinitionObject;