diff --git a/awx/ui/client/features/output/search.component.js b/awx/ui/client/features/output/search.component.js index 09ef3e52f2..cb8299be89 100644 --- a/awx/ui/client/features/output/search.component.js +++ b/awx/ui/client/features/output/search.component.js @@ -1,3 +1,4 @@ +/* eslint camelcase: 0 */ import { OUTPUT_SEARCH_DOCLINK, OUTPUT_SEARCH_FIELDS, @@ -17,7 +18,7 @@ function toggleSearchKey () { } function getCurrentQueryset () { - const { job_event_search } = $state.params; // eslint-disable-line camelcase + const { job_event_search } = $state.params; return qs.decodeArr(job_event_search); } @@ -114,12 +115,13 @@ function JobSearchController (_$state_, _qs_, _strings_, { subscribe }) { vm.key = false; vm.rejected = false; vm.disabled = true; - vm.running = false; + vm.isJobActive = false; vm.tags = getSearchTags(getCurrentQueryset()); - unsubscribe = subscribe(({ running }) => { - vm.disabled = running; - vm.running = running; + unsubscribe = subscribe(({ running, event_processing_finished }) => { + const isJobActive = running || !event_processing_finished; + vm.disabled = isJobActive; + vm.isJobActive = isJobActive; }); }; diff --git a/awx/ui/client/features/output/search.partial.html b/awx/ui/client/features/output/search.partial.html index 602270bd95..b6e6a7342f 100644 --- a/awx/ui/client/features/output/search.partial.html +++ b/awx/ui/client/features/output/search.partial.html @@ -7,7 +7,7 @@ ng-disabled="vm.disabled" ng-class="{ 'at-Input--rejected': vm.rejected }" ng-model="vm.value" - ng-attr-placeholder="{{ vm.running ? + ng-attr-placeholder="{{ vm.isJobActive ? vm.strings.get('search.PLACEHOLDER_RUNNING') : vm.strings.get('search.PLACEHOLDER_DEFAULT') }}"> diff --git a/awx/ui/client/features/output/status.service.js b/awx/ui/client/features/output/status.service.js index ad3bbd8886..f661d5b491 100644 --- a/awx/ui/client/features/output/status.service.js +++ b/awx/ui/client/features/output/status.service.js @@ -50,7 +50,8 @@ function JobStatusService (moment, message) { inventoryScm: { id: model.get('source_project_update'), status: model.get('summary_fields.inventory_source.status') - } + }, + event_processing_finished: model.get('event_processing_finished'), }; this.initHostStatusCounts({ model }); @@ -309,6 +310,10 @@ function JobStatusService (moment, message) { this.state.resultTraceback = traceback; }; + this.setEventProcessingFinished = val => { + this.state.event_processing_finished = val; + }; + this.setHostStatusCounts = counts => { counts = counts || {}; @@ -348,6 +353,7 @@ function JobStatusService (moment, message) { this.setArtifacts(model.get('artifacts')); this.setExecutionNode(model.get('execution_node')); this.setResultTraceback(model.get('result_traceback')); + this.setEventProcessingFinished(model.get('event_processing_finished')); this.initHostStatusCounts({ model }); this.initPlaybookCounts({ model });