From 74c486a4cd106e4b6eb043b0b88cfd269b7f210a Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 3 Jul 2017 15:14:32 -0700 Subject: [PATCH] show/hide Insights action buttons to prevent the user from navigating to the insights dashboard if they don't have their insights inventory configured with an insights credential. --- awx/ui/client/src/inventories-hosts/hosts/host.form.js | 2 +- awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html | 2 +- .../inventories/related/hosts/related-host.form.js | 2 +- .../inventories/related/hosts/related-host.list.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/hosts/host.form.js b/awx/ui/client/src/inventories-hosts/hosts/host.form.js index a736fd5448..3fbf7aeb86 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/host.form.js +++ b/awx/ui/client/src/inventories-hosts/hosts/host.form.js @@ -126,7 +126,7 @@ function(i18n) { dataPlacement: 'top', title: i18n._('Insights'), skipGenerator: true, - ngIf: 'host.insights_system_id!==null' + ngIf: "host.insights_system_id!==null && host.summary_fields.inventory.hasOwnProperty('insights_credential_id')" } } }; diff --git a/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html b/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html index 1f11db98bb..5848fd1b82 100644 --- a/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html +++ b/awx/ui/client/src/inventories-hosts/hosts/hosts.partial.html @@ -74,7 +74,7 @@
-