From 5e9448a85429aaaeddb595c8de60785cf4573a20 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 10 Sep 2019 10:39:01 -0400 Subject: [PATCH] always show launched by webhook details if there's a webhook guid --- .../features/output/details.component.js | 18 +++++++++--------- .../workflow-results.partial.html | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/awx/ui/client/features/output/details.component.js b/awx/ui/client/features/output/details.component.js index 47cad34468..a20713bd73 100644 --- a/awx/ui/client/features/output/details.component.js +++ b/awx/ui/client/features/output/details.component.js @@ -266,15 +266,7 @@ function getLaunchedByDetails () { let tooltip; let value; - if (createdBy) { - tooltip = strings.get('tooltips.USER'); - link = `/#/users/${createdBy.id}`; - value = $filter('sanitize')(createdBy.username); - } else if (relatedSchedule && jobTemplate) { - tooltip = strings.get('tooltips.SCHEDULE'); - link = `/#/templates/job_template/${jobTemplate.id}/schedules/${schedule.id}`; - value = $filter('sanitize')(schedule.name); - } else if (webhookGUID && jobTemplate) { + if (webhookGUID && jobTemplate) { tooltip = strings.get('tooltips.WEBHOOK_JOB_TEMPLATE'); link = `/#/templates/job_template/${jobTemplate.id}`; value = strings.get('details.WEBHOOK'); @@ -282,6 +274,14 @@ function getLaunchedByDetails () { tooltip = strings.get('tooltips.WEBHOOK_WORKFLOW_JOB_TEMPLATE'); link = `/#/templates/workflow_job_template/${workflowJobTemplate.id}`; value = strings.get('details.WEBHOOK'); + } else if (createdBy) { + tooltip = strings.get('tooltips.USER'); + link = `/#/users/${createdBy.id}`; + value = $filter('sanitize')(createdBy.username); + } else if (relatedSchedule && jobTemplate) { + tooltip = strings.get('tooltips.SCHEDULE'); + link = `/#/templates/job_template/${jobTemplate.id}/schedules/${schedule.id}`; + value = $filter('sanitize')(schedule.name); } else { tooltip = null; link = null; diff --git a/awx/ui/client/src/workflow-results/workflow-results.partial.html b/awx/ui/client/src/workflow-results/workflow-results.partial.html index ca735286ec..d2c87893c1 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.partial.html +++ b/awx/ui/client/src/workflow-results/workflow-results.partial.html @@ -177,7 +177,7 @@
+ ng-show="workflow.summary_fields.created_by.username && !launched_by_webhook_link"> @@ -192,7 +192,7 @@
+ ng-show="workflow.summary_fields.schedule.name && !launched_by_webhook_link">