mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
making ec2 credential optional for ec2 inventory
and fixing the autopopulate for that field (it should not autopopulate)
This commit is contained in:
@@ -100,6 +100,7 @@
|
|||||||
// equal to case 'ec2' || 'rax' || 'azure' || 'azure_rm' || 'vmware' || 'satellite6' || 'cloudforms' || 'openstack'
|
// equal to case 'ec2' || 'rax' || 'azure' || 'azure_rm' || 'vmware' || 'satellite6' || 'cloudforms' || 'openstack'
|
||||||
else{
|
else{
|
||||||
var credentialBasePath = (source === 'ec2') ? GetBasePath('credentials') + '?kind=aws' : GetBasePath('credentials') + (source === '' ? '' : '?kind=' + (source));
|
var credentialBasePath = (source === 'ec2') ? GetBasePath('credentials') + '?kind=aws' : GetBasePath('credentials') + (source === '' ? '' : '?kind=' + (source));
|
||||||
|
$scope.cloudCredentialRequired = source !== '' && source !== 'custom' && source !== 'ec2' ? true : false;
|
||||||
CredentialList.basePath = credentialBasePath;
|
CredentialList.basePath = credentialBasePath;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
@@ -122,7 +123,7 @@
|
|||||||
$scope.group_by_choices = source === 'ec2' ? $scope.ec2_group_by : null;
|
$scope.group_by_choices = source === 'ec2' ? $scope.ec2_group_by : null;
|
||||||
// azure_rm regions choices are keyed as "azure" in an OPTIONS request to the inventory_sources endpoint
|
// azure_rm regions choices are keyed as "azure" in an OPTIONS request to the inventory_sources endpoint
|
||||||
$scope.source_region_choices = source === 'azure_rm' ? $scope.azure_regions : $scope[source + '_regions'];
|
$scope.source_region_choices = source === 'azure_rm' ? $scope.azure_regions : $scope[source + '_regions'];
|
||||||
$scope.cloudCredentialRequired = source !== '' && source !== 'custom' ? true : false;
|
$scope.cloudCredentialRequired = source !== '' && source !== 'custom' && source !== 'ec2' ? true : false;
|
||||||
$scope.group_by = null;
|
$scope.group_by = null;
|
||||||
$scope.source_regions = null;
|
$scope.source_regions = null;
|
||||||
$scope.credential = null;
|
$scope.credential = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user