mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
linting fixes
This commit is contained in:
committed by
Jake McDermott
parent
5da13683ce
commit
e152b30fc1
@@ -153,7 +153,7 @@ const getTeam = (namespace = session) => getOrganization(namespace)
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const getSmartInventory = (namespace = session) => getOrganization(namespace)
|
const getSmartInventory = (namespace = session) => getOrganization(namespace)
|
||||||
.then(organization => getOrCreate(`/inventories/`, {
|
.then(organization => getOrCreate('/inventories/', {
|
||||||
name: `${namespace}-smart-inventory`,
|
name: `${namespace}-smart-inventory`,
|
||||||
description: namespace,
|
description: namespace,
|
||||||
organization: organization.id,
|
organization: organization.id,
|
||||||
@@ -218,15 +218,6 @@ const getUpdatedProject = (namespace = session) => getProject(namespace)
|
|||||||
return project;
|
return project;
|
||||||
});
|
});
|
||||||
|
|
||||||
const getJob = (namespace = session) => getJobTemplate(namespace)
|
|
||||||
.then(template => {
|
|
||||||
const launchURL = template.related.launch;
|
|
||||||
return post(launchURL, {}).then(response => {
|
|
||||||
const jobURL = response.data.url;
|
|
||||||
return waitForJob(jobURL).then(() => response.data);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const getJobTemplate = (namespace = session) => {
|
const getJobTemplate = (namespace = session) => {
|
||||||
const promises = [
|
const promises = [
|
||||||
getInventory(namespace),
|
getInventory(namespace),
|
||||||
@@ -245,8 +236,16 @@ const getJobTemplate = (namespace = session) => {
|
|||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
const getWorkflowTemplate = (namespace = session) => {
|
const getJob = (namespace = session) => getJobTemplate(namespace)
|
||||||
|
.then(template => {
|
||||||
|
const launchURL = template.related.launch;
|
||||||
|
return post(launchURL, {}).then(response => {
|
||||||
|
const jobURL = response.data.url;
|
||||||
|
return waitForJob(jobURL).then(() => response.data);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const getWorkflowTemplate = (namespace = session) => {
|
||||||
const workflowTemplatePromise = getOrganization(namespace)
|
const workflowTemplatePromise = getOrganization(namespace)
|
||||||
.then(organization => getOrCreate(`/organizations/${organization.id}/workflow_job_templates/`, {
|
.then(organization => getOrCreate(`/organizations/${organization.id}/workflow_job_templates/`, {
|
||||||
name: `${namespace}-workflow-template`,
|
name: `${namespace}-workflow-template`,
|
||||||
|
|||||||
Reference in New Issue
Block a user