1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

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
This commit is contained in:
Jared Tabor 2014-12-15 15:11:43 -05:00
parent cc7edc770e
commit b12d5c90fd

View File

@ -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,