From 36dfd780bbd0ace3811add2fea961cc7db19d424 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Sat, 16 Aug 2014 03:47:38 -0400 Subject: [PATCH] Job detail page Fixed https://trello.com/c/dKA4UU0U/308-if-a-job-products-no-plays-tasks-or-job-host-summaries-the-corresponding-page-sections-say-loading --- awx/ui/static/js/controllers/JobDetail.js | 6 +++- awx/ui/static/partials/job_detail.html | 34 +++++++++++++++-------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/awx/ui/static/js/controllers/JobDetail.js b/awx/ui/static/js/controllers/JobDetail.js index cf413bd1e6..e8dbe5b899 100644 --- a/awx/ui/static/js/controllers/JobDetail.js +++ b/awx/ui/static/js/controllers/JobDetail.js @@ -39,6 +39,9 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar scope.hostResultsLoading = true; scope.hostSummariesLoading = true; + // Turn on the 'Waiting...' message until events begin arriving + scope.waiting = true; + scope.liveEventProcessing = true; // true while job is active and live events are arriving scope.pauseLiveEvents = false; // control play/pause state of event processing @@ -93,6 +96,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar event_socket.init(); event_socket.on("job_events-" + job_id, function(data) { if (api_complete && data.id > lastEventId) { + scope.waiting = false; data.event = data.event_name; DigestEvent({ scope: scope, event: data }); } @@ -430,7 +434,6 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar scope.host_summary.unreachable = 0; scope.host_summary.failed = 0; scope.host_summary.total = 0; - scope.jobData.plays = {}; var url = scope.job.url + 'job_plays/?order_by=id'; @@ -627,6 +630,7 @@ function JobDetailController ($location, $rootScope, $scope, $compile, $routePar scope.job_status.finished = data.finsished; scope.liveEventProcessing = false; scope.pauseLiveEvents = false; + scope.waiting = false; } else { scope.job_status.finished = null; diff --git a/awx/ui/static/partials/job_detail.html b/awx/ui/static/partials/job_detail.html index 4212604846..8a1b531efa 100644 --- a/awx/ui/static/partials/job_detail.html +++ b/awx/ui/static/partials/job_detail.html @@ -178,11 +178,14 @@ {{ play.name }} - + + Waiting... + + Loading... - - Waiting... + + No matching plays @@ -242,11 +245,14 @@ {{ task.name }}
{{ task.successfulCount }}
{{ task.changedCount }}
{{ task.skippedCount }}
{{ task.failedCount }}
{{ task.unreachableCount }}
{{ task.missingCount }}
No matching hosts
- + + Waiting... + + Loading... - - Waiting... + + No matching tasks @@ -304,11 +310,14 @@ {{ result.msg }} - + + Waiting... + + Loading... - - Waiting... + + No matching host events @@ -384,10 +393,13 @@ {{ host.failed }} - + + Waiting... + + Loading... - + No matching hosts