From 43a04e6ada74385b249c482893c725a8ce47eea9 Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Thu, 5 Jan 2017 16:39:00 -0800 Subject: [PATCH] fixing the lookup modal for groups-> add credential lookup and fixing the ec2 lookup to query for "aws" --- awx/ui/client/src/forms/Groups.js | 5 +++++ .../src/inventories/manage/groups/groups-add.controller.js | 3 ++- .../src/inventories/manage/groups/groups-edit.controller.js | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/forms/Groups.js b/awx/ui/client/src/forms/Groups.js index b5c876c3b9..944fddd2c5 100644 --- a/awx/ui/client/src/forms/Groups.js +++ b/awx/ui/client/src/forms/Groups.js @@ -69,6 +69,11 @@ export default ngModel: 'source' }, credential: { + // initializes a default value for this search param + // search params with default values set will not generate user-interactable search tags + search: { + kind: null + }, label: 'Cloud Credential', type: 'lookup', list: 'CredentialList', diff --git a/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js index 031cf03f8a..9229595d96 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-add.controller.js @@ -31,9 +31,10 @@ export default ['$state', '$stateParams', '$scope', 'GroupForm', 'CredentialList } $scope.lookupCredential = function(){ + let kind = ($scope.source.value === "ec2") ? "aws" : $scope.source.value; $state.go('.credential', { credential_search: { - kind: $scope.source.value, + kind: kind, page_size: '5', page: '1' } diff --git a/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js index 796dee5066..1b54bc92f1 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-edit.controller.js @@ -58,9 +58,10 @@ export default ['$state', '$stateParams', '$scope', 'ToggleNotification', 'Parse }; $scope.lookupCredential = function(){ + let kind = ($scope.source.value === "ec2") ? "aws" : $scope.source.value; $state.go('.credential', { credential_search: { - kind: $scope.source.value, + kind: kind, page_size: '5', page: '1' }