mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
Merge pull request #7158 from mabashian/7134-6351
Fix scm inv source credential lookup
This commit is contained in:
@@ -71,14 +71,25 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.lookupCredential = function(){
|
$scope.lookupCredential = function(){
|
||||||
let kind = ($scope.source.value === "ec2") ? "aws" : $scope.source.value;
|
if($scope.source.value !== "scm" && $scope.source.value !== "custom") {
|
||||||
$state.go('.credential', {
|
let kind = ($scope.source.value === "ec2") ? "aws" : $scope.source.value;
|
||||||
credential_search: {
|
$state.go('.credential', {
|
||||||
kind: kind,
|
credential_search: {
|
||||||
page_size: '5',
|
kind: kind,
|
||||||
page: '1'
|
page_size: '5',
|
||||||
}
|
page: '1'
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$state.go('.credential', {
|
||||||
|
credential_search: {
|
||||||
|
credential_type__kind: "cloud",
|
||||||
|
page_size: '5',
|
||||||
|
page: '1'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.lookupProject = function(){
|
$scope.lookupProject = function(){
|
||||||
|
|||||||
@@ -300,14 +300,25 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.lookupCredential = function(){
|
$scope.lookupCredential = function(){
|
||||||
let kind = ($scope.source.value === "ec2") ? "aws" : $scope.source.value;
|
if($scope.source.value !== "scm" && $scope.source.value !== "custom") {
|
||||||
$state.go('.credential', {
|
let kind = ($scope.source.value === "ec2") ? "aws" : $scope.source.value;
|
||||||
credential_search: {
|
$state.go('.credential', {
|
||||||
kind: kind,
|
credential_search: {
|
||||||
page_size: '5',
|
kind: kind,
|
||||||
page: '1'
|
page_size: '5',
|
||||||
}
|
page: '1'
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$state.go('.credential', {
|
||||||
|
credential_search: {
|
||||||
|
credential_type__kind: "cloud",
|
||||||
|
page_size: '5',
|
||||||
|
page: '1'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.formCancel = function() {
|
$scope.formCancel = function() {
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ export default {
|
|||||||
page_size:"5",
|
page_size:"5",
|
||||||
order_by:"name",
|
order_by:"name",
|
||||||
role_level:"use_role",
|
role_level:"use_role",
|
||||||
kind: null
|
kind: null,
|
||||||
|
credential_type__kind: null
|
||||||
},
|
},
|
||||||
dynamic:true,
|
dynamic:true,
|
||||||
squash:""
|
squash:""
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ return {
|
|||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
list: 'CredentialList',
|
list: 'CredentialList',
|
||||||
basePath: 'credentials',
|
basePath: 'credentials',
|
||||||
ngShow: "source && source.value !== '' && source.value !== 'custom'",
|
ngShow: "source && source.value !== ''",
|
||||||
sourceModel: 'credential',
|
sourceModel: 'credential',
|
||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
ngClick: 'lookupCredential()',
|
ngClick: 'lookupCredential()',
|
||||||
|
|||||||
Reference in New Issue
Block a user