mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
tacacs ui implementation
This commit is contained in:
parent
932f53b2ea
commit
1a96e20a07
@ -18,6 +18,7 @@ export default [
|
||||
'configurationGoogleForm',
|
||||
'configurationLdapForm',
|
||||
'configurationRadiusForm',
|
||||
'configurationTacacsForm',
|
||||
'configurationSamlForm',
|
||||
'ConfigurationService',
|
||||
'ConfigurationUtils',
|
||||
@ -39,6 +40,7 @@ export default [
|
||||
configurationGoogleForm,
|
||||
configurationLdapForm,
|
||||
configurationRadiusForm,
|
||||
configurationTacacsForm,
|
||||
configurationSamlForm,
|
||||
ConfigurationService,
|
||||
ConfigurationUtils,
|
||||
@ -107,6 +109,7 @@ export default [
|
||||
{label: i18n._('Google OAuth2'), value: 'google_oauth'},
|
||||
{label: i18n._('LDAP'), value: 'ldap'},
|
||||
{label: i18n._('RADIUS'), value: 'radius'},
|
||||
{label: i18n._('TACACS+'), value: 'tacacs'},
|
||||
{label: i18n._('SAML'), value: 'saml'}
|
||||
];
|
||||
|
||||
@ -143,6 +146,10 @@ export default [
|
||||
formDef: configurationRadiusForm,
|
||||
id: 'auth-radius-form',
|
||||
name: 'radius'
|
||||
}, {
|
||||
formDef: configurationTacacsForm,
|
||||
id: 'auth-tacacs-form',
|
||||
name: 'tacacs'
|
||||
}, {
|
||||
formDef: configurationSamlForm,
|
||||
id: 'auth-saml-form',
|
||||
@ -258,10 +265,33 @@ 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 });
|
||||
}
|
||||
|
||||
if(flag !== undefined){
|
||||
dropdownRendered = flag;
|
||||
}
|
||||
|
||||
if(!dropdownRendered) {
|
||||
dropdownRendered = true;
|
||||
CreateSelect2({
|
||||
element: '#configuration_tacacs_template_TACACSPLUS_AUTH_PROTOCOL',
|
||||
multiple: false,
|
||||
placeholder: i18n._('Select group types'),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$scope.$on('AUTH_LDAP_GROUP_TYPE_populated', function(e, data, flag) {
|
||||
populateLDAPGroupType(flag);
|
||||
});
|
||||
|
||||
$scope.$on('TACACSPLUS_AUTH_PROTOCOL_populated', function(e, data, flag) {
|
||||
populateTacacsProtocol(flag);
|
||||
});
|
||||
|
||||
$scope.$on('codeMirror_populated', function(e, key) {
|
||||
startCodeMirrors(key);
|
||||
});
|
||||
@ -269,6 +299,7 @@ export default [
|
||||
$scope.$on('populated', function() {
|
||||
startCodeMirrors();
|
||||
populateLDAPGroupType(false);
|
||||
populateTacacsProtocol(false);
|
||||
});
|
||||
|
||||
angular.extend(authVm, {
|
||||
|
@ -48,6 +48,11 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="authVm.activeAuthForm === 'tacacs'">
|
||||
<div id="auth-tacacs-form">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="authVm.activeAuthForm === 'saml'">
|
||||
<div id="auth-saml-form">
|
||||
|
||||
|
@ -0,0 +1,58 @@
|
||||
/*************************************************
|
||||
* Copyright (c) 2016 Ansible, Inc.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default ['i18n', function(i18n) {
|
||||
return {
|
||||
// editTitle: 'Authorization Configuration',
|
||||
name: 'configuration_tacacs_template',
|
||||
showActions: true,
|
||||
showHeader: false,
|
||||
|
||||
fields: {
|
||||
TACACSPLUS_HOST: {
|
||||
type: 'text',
|
||||
reset: 'TACACSPLUS_HOST'
|
||||
},
|
||||
TACACSPLUS_PORT: {
|
||||
type: 'text',
|
||||
reset: 'TACACSPLUS_PORT'
|
||||
},
|
||||
TACACSPLUS_SECRET: {
|
||||
type: 'sensitive',
|
||||
hasShowInputButton: true,
|
||||
reset: 'TACACSPLUS_SECRET'
|
||||
},
|
||||
TACACSPLUS_SESSION_TIMEOUT: {
|
||||
type: 'number',
|
||||
integer: true,
|
||||
spinner: true,
|
||||
min: 0,
|
||||
reset: 'TACACSPLUS_SESSION_TIMEOUT'
|
||||
},
|
||||
TACACSPLUS_AUTH_PROTOCOL: {
|
||||
type: 'select',
|
||||
reset: 'TACACSPLUS_AUTH_PROTOCOL',
|
||||
ngOptions: 'protocol.label for protocol in TACACSPLUS_AUTH_PROTOCOL_options track by protocol.value'
|
||||
}
|
||||
},
|
||||
|
||||
buttons: {
|
||||
reset: {
|
||||
ngClick: 'vm.resetAllConfirm()',
|
||||
label: i18n._('Revert all to default'),
|
||||
class: 'Form-resetAll'
|
||||
},
|
||||
cancel: {
|
||||
ngClick: 'vm.formCancel()',
|
||||
},
|
||||
save: {
|
||||
ngClick: 'vm.formSave()',
|
||||
ngDisabled: true
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
];
|
@ -16,6 +16,7 @@ export default [
|
||||
'configurationGoogleForm',
|
||||
'configurationLdapForm',
|
||||
'configurationRadiusForm',
|
||||
'configurationTacacsForm',
|
||||
'configurationSamlForm',
|
||||
'systemActivityStreamForm',
|
||||
'systemLoggingForm',
|
||||
@ -34,6 +35,7 @@ export default [
|
||||
configurationGoogleForm,
|
||||
configurationLdapForm,
|
||||
configurationRadiusForm,
|
||||
configurationTacacsForm,
|
||||
configurationSamlForm,
|
||||
systemActivityStreamForm,
|
||||
systemLoggingForm,
|
||||
@ -51,6 +53,7 @@ export default [
|
||||
'google_oauth': configurationGoogleForm,
|
||||
'ldap': configurationLdapForm,
|
||||
'radius': configurationRadiusForm,
|
||||
'tacacs': configurationTacacsForm,
|
||||
'saml': configurationSamlForm,
|
||||
'activity_stream': systemActivityStreamForm,
|
||||
'logging': systemLoggingForm,
|
||||
|
@ -18,6 +18,7 @@ import configurationGithubTeamForm from './auth-form/sub-forms/auth-github-team.
|
||||
import configurationGoogleForm from './auth-form/sub-forms/auth-google-oauth2.form';
|
||||
import configurationLdapForm from './auth-form/sub-forms/auth-ldap.form.js';
|
||||
import configurationRadiusForm from './auth-form/sub-forms/auth-radius.form.js';
|
||||
import configurationTacacsForm from './auth-form/sub-forms/auth-tacacs.form.js';
|
||||
import configurationSamlForm from './auth-form/sub-forms/auth-saml.form';
|
||||
|
||||
//system sub-forms
|
||||
@ -39,6 +40,7 @@ angular.module('configuration', [])
|
||||
.factory('configurationGoogleForm', configurationGoogleForm)
|
||||
.factory('configurationLdapForm', configurationLdapForm)
|
||||
.factory('configurationRadiusForm', configurationRadiusForm)
|
||||
.factory('configurationTacacsForm', configurationTacacsForm)
|
||||
.factory('configurationSamlForm', configurationSamlForm)
|
||||
//system forms
|
||||
.factory('systemActivityStreamForm', systemActivityStreamForm)
|
||||
|
Loading…
Reference in New Issue
Block a user