From b12d5c90fde002ba73c62dcf6cada06a5c68189a Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 15 Dec 2014 15:11:43 -0500 Subject: [PATCH] Inventory add/edit group->filter custom inv by org On the inventory page, if you're adding/editing a group with source is custom, the lookup for an inventory script should be filtered by the organization that is associated with that inventory --- awx/ui/static/js/helpers/Groups.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index c9ca93508f..492241a776 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -259,7 +259,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' $('#source_form').addClass('squeeze'); } if(scope.source.value==="custom"){ - invUrl = GetBasePath('inventory_scripts'); + // need to filter the possible custom scripts by the organization defined for the current inventory + invUrl = GetBasePath('inventory_scripts') + '?organization='+scope.$parent.inventory.organization; LookUpInit({ url: invUrl, scope: scope,