mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -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 };
|
||||
}
|
||||
|
||||
function getArtifactsDetails () {
|
||||
const artifacts = resource.model.get('artifacts');
|
||||
function getArtifactsDetails (val) {
|
||||
const artifacts = val || resource.model.get('artifacts');
|
||||
|
||||
if (!artifacts) {
|
||||
return null;
|
||||
@@ -823,6 +823,7 @@ function JobDetailsController (
|
||||
scm,
|
||||
inventoryScm,
|
||||
environment,
|
||||
artifacts,
|
||||
executionNode
|
||||
}) => {
|
||||
vm.started = getStartDetails(started);
|
||||
@@ -830,6 +831,7 @@ function JobDetailsController (
|
||||
vm.projectUpdate = getProjectUpdateDetails(scm.id);
|
||||
vm.projectStatus = getProjectStatusDetails(scm.status);
|
||||
vm.environment = getEnvironmentDetails(environment);
|
||||
vm.artifacts = getArtifactsDetails(artifacts);
|
||||
vm.executionNode = getExecutionNodeDetails(executionNode);
|
||||
vm.inventoryScm = getInventoryScmDetails(inventoryScm.id, inventoryScm.status);
|
||||
vm.status = getStatusDetails(status);
|
||||
|
||||
@@ -40,6 +40,7 @@ function JobStatusService (moment, message) {
|
||||
started: model.get('started'),
|
||||
finished: model.get('finished'),
|
||||
environment: model.get('custom_virtualenv'),
|
||||
artifacts: model.get('artifacts'),
|
||||
scm: {
|
||||
id: model.get('summary_fields.project_update.id'),
|
||||
status: model.get('summary_fields.project_update.status')
|
||||
@@ -279,6 +280,12 @@ function JobStatusService (moment, message) {
|
||||
this.state.environment = env;
|
||||
};
|
||||
|
||||
this.setArtifacts = val => {
|
||||
if (!val) return;
|
||||
|
||||
this.state.artifacts = val;
|
||||
};
|
||||
|
||||
this.setExecutionNode = node => {
|
||||
if (!node) return;
|
||||
|
||||
@@ -327,6 +334,7 @@ function JobStatusService (moment, message) {
|
||||
this.setStarted(model.get('started'));
|
||||
this.setJobStatus(model.get('status'));
|
||||
this.setEnvironment(model.get('custom_virtualenv'));
|
||||
this.setArtifacts(model.get('artifacts'));
|
||||
this.setExecutionNode(model.get('execution_node'));
|
||||
|
||||
this.initHostStatusCounts({ model });
|
||||
|
||||
Reference in New Issue
Block a user