mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
Add artifacts as a subscriber to job details status service.
- This will emerge the artifacts field values if they become available to the UI from the API once a job has completed successfully.
This commit is contained in:
@@ -577,8 +577,8 @@ function getExtraVarsDetails () {
|
|||||||
return { label, tooltip, value, disabled, name };
|
return { label, tooltip, value, disabled, name };
|
||||||
}
|
}
|
||||||
|
|
||||||
function getArtifactsDetails () {
|
function getArtifactsDetails (val) {
|
||||||
const artifacts = resource.model.get('artifacts');
|
const artifacts = val || resource.model.get('artifacts');
|
||||||
|
|
||||||
if (!artifacts) {
|
if (!artifacts) {
|
||||||
return null;
|
return null;
|
||||||
@@ -823,6 +823,7 @@ function JobDetailsController (
|
|||||||
scm,
|
scm,
|
||||||
inventoryScm,
|
inventoryScm,
|
||||||
environment,
|
environment,
|
||||||
|
artifacts,
|
||||||
executionNode
|
executionNode
|
||||||
}) => {
|
}) => {
|
||||||
vm.started = getStartDetails(started);
|
vm.started = getStartDetails(started);
|
||||||
@@ -830,6 +831,7 @@ function JobDetailsController (
|
|||||||
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.artifacts = getArtifactsDetails(artifacts);
|
||||||
vm.executionNode = getExecutionNodeDetails(executionNode);
|
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);
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ function JobStatusService (moment, message) {
|
|||||||
started: model.get('started'),
|
started: model.get('started'),
|
||||||
finished: model.get('finished'),
|
finished: model.get('finished'),
|
||||||
environment: model.get('custom_virtualenv'),
|
environment: model.get('custom_virtualenv'),
|
||||||
|
artifacts: model.get('artifacts'),
|
||||||
scm: {
|
scm: {
|
||||||
id: model.get('summary_fields.project_update.id'),
|
id: model.get('summary_fields.project_update.id'),
|
||||||
status: model.get('summary_fields.project_update.status')
|
status: model.get('summary_fields.project_update.status')
|
||||||
@@ -279,6 +280,12 @@ function JobStatusService (moment, message) {
|
|||||||
this.state.environment = env;
|
this.state.environment = env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setArtifacts = val => {
|
||||||
|
if (!val) return;
|
||||||
|
|
||||||
|
this.state.artifacts = val;
|
||||||
|
};
|
||||||
|
|
||||||
this.setExecutionNode = node => {
|
this.setExecutionNode = node => {
|
||||||
if (!node) return;
|
if (!node) return;
|
||||||
|
|
||||||
@@ -327,6 +334,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.setArtifacts(model.get('artifacts'));
|
||||||
this.setExecutionNode(model.get('execution_node'));
|
this.setExecutionNode(model.get('execution_node'));
|
||||||
|
|
||||||
this.initHostStatusCounts({ model });
|
this.initHostStatusCounts({ model });
|
||||||
|
|||||||
Reference in New Issue
Block a user