fixing the lookup modal for groups-> add credential lookup

and fixing the ec2 lookup to query for "aws"
This commit is contained in:
jaredevantabor 2017-01-05 16:39:00 -08:00
parent d5247c6d95
commit 43a04e6ada
3 changed files with 9 additions and 2 deletions

View File

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

View File

@ -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'
}

View File

@ -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'
}