update configuration controllers to fix syntax warnings

This commit is contained in:
John Mitchell
2018-10-08 15:42:44 -04:00
parent b0dd10b538
commit b852caaaa3
4 changed files with 23 additions and 25 deletions

View File

@@ -21,7 +21,7 @@ export default [
CreateSelect2, CreateSelect2,
GenerateForm, GenerateForm,
i18n, i18n,
ParseTypeChange, ParseTypeChange
) { ) {
const authVm = this; const authVm = this;
const generator = GenerateForm; const generator = GenerateForm;
@@ -76,9 +76,6 @@ export default [
}).catch(() => { }).catch(() => {
event.preventDefault(); event.preventDefault();
$('#FormModal-dialog').dialog('close'); $('#FormModal-dialog').dialog('close');
if (revertDropdown) {
revertDropdown();
}
}); });
}, },
"class": "btn btn-primary", "class": "btn btn-primary",
@@ -132,72 +129,72 @@ export default [
var authForms = [ var authForms = [
{ {
formDef: formDefs['azure'], formDef: formDefs.azure,
id: 'auth-azure-form', id: 'auth-azure-form',
name: 'azure' name: 'azure'
}, },
{ {
formDef: formDefs['github'], formDef: formDefs.github,
id: 'auth-github-form', id: 'auth-github-form',
name: 'github' name: 'github'
}, },
{ {
formDef: formDefs['github_org'], formDef: formDefs.github_org,
id: 'auth-github-org-form', id: 'auth-github-org-form',
name: 'github_org' name: 'github_org'
}, },
{ {
formDef: formDefs['github_team'], formDef: formDefs.github_team,
id: 'auth-github-team-form', id: 'auth-github-team-form',
name: 'github_team' name: 'github_team'
}, },
{ {
formDef: formDefs['google_oauth'], formDef: formDefs.google_oauth,
id: 'auth-google-form', id: 'auth-google-form',
name: 'google_oauth' name: 'google_oauth'
}, },
{ {
formDef: formDefs['radius'], formDef: formDefs.radius,
id: 'auth-radius-form', id: 'auth-radius-form',
name: 'radius' name: 'radius'
}, },
{ {
formDef: formDefs['tacacs'], formDef: formDefs.tacacs,
id: 'auth-tacacs-form', id: 'auth-tacacs-form',
name: 'tacacs' name: 'tacacs'
}, },
{ {
formDef: formDefs['saml'], formDef: formDefs.saml,
id: 'auth-saml-form', id: 'auth-saml-form',
name: 'saml' name: 'saml'
}, },
{ {
formDef: formDefs['ldap'], formDef: formDefs.ldap,
id: 'auth-ldap-form', id: 'auth-ldap-form',
name: 'ldap' name: 'ldap'
}, },
{ {
formDef: formDefs['ldap1'], formDef: formDefs.ldap1,
id: 'auth-ldap1-form', id: 'auth-ldap1-form',
name: 'ldap1' name: 'ldap1'
}, },
{ {
formDef: formDefs['ldap2'], formDef: formDefs.ldap2,
id: 'auth-ldap2-form', id: 'auth-ldap2-form',
name: 'ldap2' name: 'ldap2'
}, },
{ {
formDef: formDefs['ldap3'], formDef: formDefs.ldap3,
id: 'auth-ldap3-form', id: 'auth-ldap3-form',
name: 'ldap3' name: 'ldap3'
}, },
{ {
formDef: formDefs['ldap4'], formDef: formDefs.ldap4,
id: 'auth-ldap4-form', id: 'auth-ldap4-form',
name: 'ldap4' name: 'ldap4'
}, },
{ {
formDef: formDefs['ldap5'], formDef: formDefs.ldap5,
id: 'auth-ldap5-form', id: 'auth-ldap5-form',
name: 'ldap5' name: 'ldap5'
}, },
@@ -392,7 +389,7 @@ export default [
return authVm.githubDropdownValue; return authVm.githubDropdownValue;
} }
return tab; return tab;
}; }
angular.extend(authVm, { angular.extend(authVm, {
authForms: authForms, authForms: authForms,

View File

@@ -24,6 +24,7 @@ export default [
'systemMiscForm', 'systemMiscForm',
'ConfigurationJobsForm', 'ConfigurationJobsForm',
'ConfigurationUiForm', 'ConfigurationUiForm',
'ngToast',
function( function(
$scope, $rootScope, $state, $stateParams, $q, $scope, $rootScope, $state, $stateParams, $q,
SettingsService, SettingsUtils, CreateDialog, i18n, ProcessErrors, Store, SettingsService, SettingsUtils, CreateDialog, i18n, ProcessErrors, Store,
@@ -47,7 +48,8 @@ export default [
systemLoggingForm, systemLoggingForm,
systemMiscForm, systemMiscForm,
ConfigurationJobsForm, ConfigurationJobsForm,
ConfigurationUiForm ConfigurationUiForm,
ngToast
) { ) {
const vm = this; const vm = this;
@@ -411,7 +413,7 @@ export default [
.then(function() { .then(function() {
$('#FormModal-dialog').dialog('close'); $('#FormModal-dialog').dialog('close');
$state.go('settings'); $state.go('settings');
}) });
}, },
"class": "btn btn-primary", "class": "btn btn-primary",
"id": "formmodal-save-button" "id": "formmodal-save-button"
@@ -479,7 +481,7 @@ export default [
case 'license': case 'license':
return 'LICENSE'; return 'LICENSE';
} }
} };
$scope.toggleForm = function(key) { $scope.toggleForm = function(key) {
if($rootScope.user_is_system_auditor) { if($rootScope.user_is_system_auditor) {

View File

@@ -19,9 +19,8 @@
CreateSelect2, CreateSelect2,
GenerateForm, GenerateForm,
i18n, i18n,
$stateParams, $stateParams
) { ) {
var uiVm = this;
var generator = GenerateForm; var generator = GenerateForm;
var form = ConfigurationUiForm; var form = ConfigurationUiForm;

View File

@@ -8,6 +8,6 @@ export default [ '$state',
vm.goToCard = (card) => { vm.goToCard = (card) => {
$state.go('settings.form', { form: card }); $state.go('settings.form', { form: card });
} };
} }
]; ];