1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

fix Azure RM credential lookup in Inventory > Manage > Group Add/Edit, resolves #2188 (#2195)

This commit is contained in:
Leigh 2016-06-08 10:32:43 -04:00
parent 27d6ccc2ea
commit 7506ee3509
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@
var params, source;
// group fields
var group = {
variables: $scope.variables === ('---' || '{}') ? null : $scope.variables,
variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables,
name: $scope.name,
description: $scope.description,
inventory: inventoryData.id
@ -28,7 +28,7 @@
// inventory_source fields
params = {
instance_filters: $scope.instance_filters,
source_vars: $scope[$scope.source.value + '_variables'] === ('---' || '{}') ? null : $scope[$scope.source.value + '_variables'],
source_vars: $scope[$scope.source.value + '_variables'] === '---' || $scope[$scope.source.value + '_variables'] === '{}' ? null : $scope[$scope.source.value + '_variables'],
source_script: $scope.inventory_script,
source: $scope.source.value,
credential: $scope.credential,
@ -82,7 +82,7 @@
}
};
$scope.sourceChange = function(source){
source = source.value === 'azure_rm' ? 'azure' : source.value;
source = source.value;
if (source === 'custom'){
LookUpInit({
scope: $scope,

View File

@ -20,7 +20,7 @@
var params, source;
// group fields
var group = {
variables: $scope.variables === ('---' || '{}') ? null : $scope.variables,
variables: $scope.variables === '---' || $scope.variables === '{}' ? null : $scope.variables,
name: $scope.name,
description: $scope.description,
inventory: $scope.inventory,
@ -233,7 +233,7 @@
if (inventorySourceData.source !== 'custom'){
LookUpInit({
scope: $scope,
url: GetBasePath('credentials') + (inventorySourceData.source === '' ? '' : 'kind=' + (inventorySourceData.source)),
url: GetBasePath('credentials') + (inventorySourceData.source === '' ? '' : '?kind=' + (inventorySourceData.source)),
form: form,
list: CredentialList,
field: 'credential',