1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Fix empty dropdowns for both LDAP and TACACS tabs.

This commit is contained in:
kialam 2018-11-14 18:35:47 -05:00
parent 9b992c971e
commit ea35d9713a
No known key found for this signature in database
GPG Key ID: 2D0E60E4B8C7EA0F

View File

@ -29,7 +29,7 @@ export default [
authVm.activeAuthForm = 'azure';
authVm.activeTab = 'azure';
authVm.ldapDropdownValue = '';
authVm.ldapDropdownValue = 'ldap';
authVm.githubDropdownValue = 'github';
let codeInputInitialized = false;
@ -199,7 +199,6 @@ export default [
name: 'ldap5'
},
];
var forms = _.map(authForms, 'formDef');
_.each(forms, function(form) {
var keys = _.keys(form.fields);
@ -207,9 +206,9 @@ export default [
if($scope.configDataResolve[key].type === 'choice') {
// Create options for dropdowns
var optionsGroup = key + '_options';
$scope.$parent[optionsGroup] = [];
$scope.$parent.$parent[optionsGroup] = [];
_.each($scope.configDataResolve[key].choices, function(choice){
$scope.$parent[optionsGroup].push({
$scope.$parent.$parent[optionsGroup].push({
name: choice[0],
label: choice[1],
value: choice[0]
@ -303,7 +302,7 @@ export default [
}
if($scope.$parent[groupPropName] !== null) {
$scope.$parent[groupPropName] = _.find($scope[groupOptionsPropName], { value: $scope.$parent[groupPropName] });
$scope.$parent.$parent[groupPropName] = _.find($scope[groupOptionsPropName], { value: $scope.$parent[groupPropName] });
}
if(flag !== undefined){
@ -322,7 +321,7 @@ export default [
function populateTacacsProtocol(flag){
if($scope.$parent.TACACSPLUS_AUTH_PROTOCOL !== null) {
$scope.$parent.TACACSPLUS_AUTH_PROTOCOL = _.find($scope.$parent.TACACSPLUS_AUTH_PROTOCOL_options, { value: $scope.$parent.TACACSPLUS_AUTH_PROTOCOL });
$scope.$parent.$parent.TACACSPLUS_AUTH_PROTOCOL = _.find($scope.$parent.TACACSPLUS_AUTH_PROTOCOL_options, { value: $scope.$parent.TACACSPLUS_AUTH_PROTOCOL });
}
if(flag !== undefined){
@ -384,7 +383,7 @@ export default [
function getActiveAuthForm (tab) {
if (tab === 'ldap') {
return `ldap${authVm.ldapDropdownValue}`;
return authVm.ldapDropdownValue;
} else if (tab === 'github') {
return authVm.githubDropdownValue;
}