mirror of
https://github.com/ansible/awx.git
synced 2026-07-11 08:18:07 -02:30
Use job launch_type field to detect webhook jobs
We have a launch type field for categorizing the different ways jobs can be launched. This updates the UI to use this field when checking if a job was launched by a webhook.
This commit is contained in:
committed by
Jeff Bradberry
parent
df24f5d28f
commit
84dcda0a61
@@ -254,9 +254,9 @@ function getLaunchedByDetails () {
|
||||
const workflowJobTemplate = resource.model.get('summary_fields.workflow_job_template');
|
||||
const relatedSchedule = resource.model.get('related.schedule');
|
||||
const schedule = resource.model.get('summary_fields.schedule');
|
||||
const webhookGUID = resource.model.get('webhook_guid');
|
||||
const launchType = resource.model.get('launch_type');
|
||||
|
||||
if (!createdBy && !schedule && !webhookGUID) {
|
||||
if (!createdBy && !schedule && !launchType) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -266,11 +266,11 @@ function getLaunchedByDetails () {
|
||||
let tooltip;
|
||||
let value;
|
||||
|
||||
if (webhookGUID && jobTemplate) {
|
||||
if (launchType === 'webhook' && jobTemplate) {
|
||||
tooltip = strings.get('tooltips.WEBHOOK_JOB_TEMPLATE');
|
||||
link = `/#/templates/job_template/${jobTemplate.id}`;
|
||||
value = strings.get('details.WEBHOOK');
|
||||
} else if (webhookGUID && workflowJobTemplate) {
|
||||
} else if (launchType === 'webhook' && workflowJobTemplate) {
|
||||
tooltip = strings.get('tooltips.WEBHOOK_WORKFLOW_JOB_TEMPLATE');
|
||||
link = `/#/templates/workflow_job_template/${workflowJobTemplate.id}`;
|
||||
value = strings.get('details.WEBHOOK');
|
||||
|
||||
Reference in New Issue
Block a user