From 43ea72e27846b154fedcff61bb43aa2565135b43 Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Wed, 9 May 2018 19:07:23 -0400 Subject: [PATCH] show inventory source details --- .../client/features/output/details.component.js | 15 +++++++++++++++ .../client/features/output/details.partial.html | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/awx/ui/client/features/output/details.component.js b/awx/ui/client/features/output/details.component.js index ccd33bc8e0..516555920c 100644 --- a/awx/ui/client/features/output/details.component.js +++ b/awx/ui/client/features/output/details.component.js @@ -180,6 +180,20 @@ function getInventoryJobNameDetails () { return { label, link, tooltip, value }; } +function getInventorySourceDetails () { + if (!resource.model.has('summary_fields.inventory_source.source')) { + return null; + } + + const { source } = resource.model.get('summary_fields.inventory_source'); + const choices = mapChoices(resource.model.options('actions.GET.source.choices')); + + const label = 'Source'; + const value = choices[source]; + + return { label, value }; +} + function getLaunchedByDetails () { const createdBy = resource.model.get('summary_fields.created_by'); const jobTemplate = resource.model.get('summary_fields.job_template'); @@ -643,6 +657,7 @@ function JobDetailsController ( vm.extraVars = getExtraVarsDetails(); vm.labels = getLabelDetails(); vm.inventoryJobName = getInventoryJobNameDetails(); + vm.inventorySource = getInventorySourceDetails(); // Relaunch and Delete Components vm.job = angular.copy(_.get(resource.model, 'model.GET', {})); diff --git a/awx/ui/client/features/output/details.partial.html b/awx/ui/client/features/output/details.partial.html index 19d7deccf0..cb2b59176a 100644 --- a/awx/ui/client/features/output/details.partial.html +++ b/awx/ui/client/features/output/details.partial.html @@ -220,6 +220,14 @@ + +
+ +
+ {{ vm.inventorySource.value }} +
+
+