mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Update execution node field from job status subscriber
This commit is contained in:
parent
eca530c788
commit
5c98d04e09
@ -481,8 +481,8 @@ function getLimitDetails () {
|
||||
return { label, value };
|
||||
}
|
||||
|
||||
function getExecutionNodeDetails () {
|
||||
const executionNode = resource.model.get('execution_node');
|
||||
function getExecutionNodeDetails (node) {
|
||||
const executionNode = node || resource.model.get('execution_node');
|
||||
|
||||
if (!executionNode) {
|
||||
return null;
|
||||
@ -796,12 +796,21 @@ function JobDetailsController (
|
||||
vm.toggleLabels = toggleLabels;
|
||||
vm.showLabels = showLabels;
|
||||
|
||||
unsubscribe = subscribe(({ status, started, finished, scm, inventoryScm, environment }) => {
|
||||
unsubscribe = subscribe(({
|
||||
status,
|
||||
started,
|
||||
finished,
|
||||
scm,
|
||||
inventoryScm,
|
||||
environment,
|
||||
executionNode
|
||||
}) => {
|
||||
vm.started = getStartDetails(started);
|
||||
vm.finished = getFinishDetails(finished);
|
||||
vm.projectUpdate = getProjectUpdateDetails(scm.id);
|
||||
vm.projectStatus = getProjectStatusDetails(scm.status);
|
||||
vm.environment = getEnvironmentDetails(environment);
|
||||
vm.executionNode = getExecutionNodeDetails(executionNode);
|
||||
vm.inventoryScm = getInventoryScmDetails(inventoryScm.id, inventoryScm.status);
|
||||
vm.status = getStatusDetails(status);
|
||||
vm.job.status = status;
|
||||
|
||||
@ -279,6 +279,12 @@ function JobStatusService (moment, message) {
|
||||
this.state.environment = env;
|
||||
};
|
||||
|
||||
this.setExecutionNode = node => {
|
||||
if (!node) return;
|
||||
|
||||
this.state.executionNode = node;
|
||||
};
|
||||
|
||||
this.setStatsEvent = data => {
|
||||
if (!data) return;
|
||||
|
||||
@ -321,6 +327,7 @@ function JobStatusService (moment, message) {
|
||||
this.setStarted(model.get('started'));
|
||||
this.setJobStatus(model.get('status'));
|
||||
this.setEnvironment(model.get('custom_virtualenv'));
|
||||
this.setExecutionNode(model.get('execution_node'));
|
||||
|
||||
this.initHostStatusCounts({ model });
|
||||
this.initPlaybookCounts({ model });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user