mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
Merge pull request #3844 from jakemcdermott/fix-3578-part-1
Always disable search when processing events
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint camelcase: 0 */
|
||||||
import {
|
import {
|
||||||
OUTPUT_SEARCH_DOCLINK,
|
OUTPUT_SEARCH_DOCLINK,
|
||||||
OUTPUT_SEARCH_FIELDS,
|
OUTPUT_SEARCH_FIELDS,
|
||||||
@@ -17,7 +18,7 @@ function toggleSearchKey () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCurrentQueryset () {
|
function getCurrentQueryset () {
|
||||||
const { job_event_search } = $state.params; // eslint-disable-line camelcase
|
const { job_event_search } = $state.params;
|
||||||
|
|
||||||
return qs.decodeArr(job_event_search);
|
return qs.decodeArr(job_event_search);
|
||||||
}
|
}
|
||||||
@@ -114,12 +115,13 @@ function JobSearchController (_$state_, _qs_, _strings_, { subscribe }) {
|
|||||||
vm.key = false;
|
vm.key = false;
|
||||||
vm.rejected = false;
|
vm.rejected = false;
|
||||||
vm.disabled = true;
|
vm.disabled = true;
|
||||||
vm.running = false;
|
vm.isJobActive = false;
|
||||||
vm.tags = getSearchTags(getCurrentQueryset());
|
vm.tags = getSearchTags(getCurrentQueryset());
|
||||||
|
|
||||||
unsubscribe = subscribe(({ running }) => {
|
unsubscribe = subscribe(({ running, event_processing_finished }) => {
|
||||||
vm.disabled = running;
|
const isJobActive = running || !event_processing_finished;
|
||||||
vm.running = running;
|
vm.disabled = isJobActive;
|
||||||
|
vm.isJobActive = isJobActive;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
ng-disabled="vm.disabled"
|
ng-disabled="vm.disabled"
|
||||||
ng-class="{ 'at-Input--rejected': vm.rejected }"
|
ng-class="{ 'at-Input--rejected': vm.rejected }"
|
||||||
ng-model="vm.value"
|
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_RUNNING') :
|
||||||
vm.strings.get('search.PLACEHOLDER_DEFAULT') }}">
|
vm.strings.get('search.PLACEHOLDER_DEFAULT') }}">
|
||||||
<span class="input-group-btn input-group-append">
|
<span class="input-group-btn input-group-append">
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ function JobStatusService (moment, message) {
|
|||||||
inventoryScm: {
|
inventoryScm: {
|
||||||
id: model.get('source_project_update'),
|
id: model.get('source_project_update'),
|
||||||
status: model.get('summary_fields.inventory_source.status')
|
status: model.get('summary_fields.inventory_source.status')
|
||||||
}
|
},
|
||||||
|
event_processing_finished: model.get('event_processing_finished'),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.initHostStatusCounts({ model });
|
this.initHostStatusCounts({ model });
|
||||||
@@ -309,6 +310,10 @@ function JobStatusService (moment, message) {
|
|||||||
this.state.resultTraceback = traceback;
|
this.state.resultTraceback = traceback;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setEventProcessingFinished = val => {
|
||||||
|
this.state.event_processing_finished = val;
|
||||||
|
};
|
||||||
|
|
||||||
this.setHostStatusCounts = counts => {
|
this.setHostStatusCounts = counts => {
|
||||||
counts = counts || {};
|
counts = counts || {};
|
||||||
|
|
||||||
@@ -348,6 +353,7 @@ function JobStatusService (moment, message) {
|
|||||||
this.setArtifacts(model.get('artifacts'));
|
this.setArtifacts(model.get('artifacts'));
|
||||||
this.setExecutionNode(model.get('execution_node'));
|
this.setExecutionNode(model.get('execution_node'));
|
||||||
this.setResultTraceback(model.get('result_traceback'));
|
this.setResultTraceback(model.get('result_traceback'));
|
||||||
|
this.setEventProcessingFinished(model.get('event_processing_finished'));
|
||||||
|
|
||||||
this.initHostStatusCounts({ model });
|
this.initHostStatusCounts({ model });
|
||||||
this.initPlaybookCounts({ model });
|
this.initPlaybookCounts({ model });
|
||||||
|
|||||||
Reference in New Issue
Block a user