mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 13:10:11 -03:30
Explicitly set the credential lists base path to include the ?kind= param so that future searches will have the correct base path.
This commit is contained in:
@@ -93,18 +93,10 @@
|
|||||||
input_type: "radio"
|
input_type: "radio"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (source === 'ec2'){
|
// equal to case 'ec2' || 'rax' || 'azure' || 'azure_rm' || 'vmware' || 'satellite6' || 'cloudforms' || 'openstack'
|
||||||
LookUpInit({
|
|
||||||
scope: $scope,
|
|
||||||
url: GetBasePath('credentials') + '?kind=aws',
|
|
||||||
form: form,
|
|
||||||
list: CredentialList,
|
|
||||||
field: 'credential',
|
|
||||||
input_type: "radio"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// equal to case 'rax' || 'azure' || 'azure_rm' || 'vmware' || 'satellite6' || 'cloudforms' || 'openstack' || 'custom'
|
|
||||||
else{
|
else{
|
||||||
|
var credentialBasePath = (source === 'ec2') ? GetBasePath('credentials') + '?kind=aws' : GetBasePath('credentials') + (source === '' ? '' : '?kind=' + (source));
|
||||||
|
CredentialList.basePath = credentialBasePath;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
url: GetBasePath('credentials') + (source === '' ? '' : '?kind=' + source),
|
url: GetBasePath('credentials') + (source === '' ? '' : '?kind=' + source),
|
||||||
|
|||||||
@@ -92,20 +92,12 @@
|
|||||||
input_type: "radio"
|
input_type: "radio"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (source.value === 'ec2'){
|
|
||||||
LookUpInit({
|
|
||||||
scope: $scope,
|
|
||||||
url: GetBasePath('credentials') + '?kind=aws',
|
|
||||||
form: form,
|
|
||||||
list: CredentialList,
|
|
||||||
field: 'credential',
|
|
||||||
input_type: "radio"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
|
var credentialBasePath = (source.value === 'ec2') ? GetBasePath('credentials') + '?kind=aws' : GetBasePath('credentials') + (source.value === '' ? '' : '?kind=' + (source.value));
|
||||||
|
CredentialList.basePath = credentialBasePath;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
url: GetBasePath('credentials') + (source.value === '' ? '' : '?kind=' + (source.value)),
|
url: credentialBasePath,
|
||||||
form: form,
|
form: form,
|
||||||
list: CredentialList,
|
list: CredentialList,
|
||||||
field: 'credential',
|
field: 'credential',
|
||||||
@@ -260,27 +252,19 @@
|
|||||||
$scope = angular.extend($scope, groupData);
|
$scope = angular.extend($scope, groupData);
|
||||||
|
|
||||||
// instantiate lookup fields
|
// instantiate lookup fields
|
||||||
if (inventorySourceData.source !== 'custom' && inventorySourceData.source !== 'ec2'){
|
if (inventorySourceData.source !== 'custom'){
|
||||||
|
var credentialBasePath = (inventorySourceData.source === 'ec2') ? GetBasePath('credentials') + '?kind=aws' : GetBasePath('credentials') + (inventorySourceData.source === '' ? '' : '?kind=' + (inventorySourceData.source));
|
||||||
|
CredentialList.basePath = credentialBasePath;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
url: GetBasePath('credentials') + (inventorySourceData.source === '' ? '' : '?kind=' + (inventorySourceData.source)),
|
url: credentialBasePath,
|
||||||
form: form,
|
form: form,
|
||||||
list: CredentialList,
|
list: CredentialList,
|
||||||
field: 'credential',
|
field: 'credential',
|
||||||
input_type: "radio"
|
input_type: "radio"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (inventorySourceData.source === 'ec2'){
|
// equal to case 'custom'
|
||||||
LookUpInit({
|
|
||||||
scope: $scope,
|
|
||||||
url: GetBasePath('credentials') + '?kind=aws',
|
|
||||||
form: form,
|
|
||||||
list: CredentialList,
|
|
||||||
field: 'credential',
|
|
||||||
input_type: "radio"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// equal to case 'rax' || 'azure' || 'azure_rm' || 'vmware' || 'satellite6' || 'cloudforms' || 'openstack' || 'custom'
|
|
||||||
else{
|
else{
|
||||||
$scope.inventory_script_name = inventorySourceData.summary_fields.source_script.name;
|
$scope.inventory_script_name = inventorySourceData.summary_fields.source_script.name;
|
||||||
LookUpInit({
|
LookUpInit({
|
||||||
|
|||||||
Reference in New Issue
Block a user