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