diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 89221d272f..63f0e2cdae 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -124,10 +124,8 @@ var tower = angular.module('Tower', [ //'templates', 'Utilities', 'OrganizationFormDefinition', - 'UserFormDefinition', 'OrganizationListDefinition', 'templates', - 'UserListDefinition', 'PromptDialog', 'AWDirectives', 'InventoriesListDefinition', diff --git a/awx/ui/client/src/forms.js b/awx/ui/client/src/forms.js index 5442dd5e17..f57b55861a 100644 --- a/awx/ui/client/src/forms.js +++ b/awx/ui/client/src/forms.js @@ -18,7 +18,6 @@ import JobVarsPrompt from "./forms/JobVarsPrompt"; import LogViewerOptions from "./forms/LogViewerOptions"; import LogViewerStatus from "./forms/LogViewerStatus"; import Organizations from "./forms/Organizations"; -import Users from "./forms/Users"; import WorkflowMaker from "./forms/WorkflowMaker"; import Workflows from "./forms/Workflows"; @@ -38,7 +37,6 @@ export LogViewerOptions, LogViewerStatus, Organizations, - Users, WorkflowMaker, Workflows }; diff --git a/awx/ui/client/src/lists.js b/awx/ui/client/src/lists.js index db2007a4c8..272ad2f55c 100644 --- a/awx/ui/client/src/lists.js +++ b/awx/ui/client/src/lists.js @@ -22,7 +22,6 @@ import ScheduledJobs from "./lists/ScheduledJobs"; import Schedules from "./lists/Schedules"; import Streams from "./lists/Streams"; import Templates from "./lists/Templates"; -import Users from "./lists/Users"; export { CompletedJobs, @@ -42,6 +41,5 @@ export ScheduledJobs, Schedules, Streams, - Templates, - Users + Templates }; diff --git a/awx/ui/client/src/users/add/users-add.controller.js b/awx/ui/client/src/users/add/users-add.controller.js index 6f7b8b75b3..3263b6d545 100644 --- a/awx/ui/client/src/users/add/users-add.controller.js +++ b/awx/ui/client/src/users/add/users-add.controller.js @@ -12,13 +12,12 @@ const user_type_options = [ { type: 'system_administrator', label: N_('System Administrator') }, ]; -export default ['$scope', '$rootScope', '$stateParams', 'UserForm', 'GenerateForm', - 'Rest', 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath', +export default ['$scope', '$rootScope', 'UserForm', 'GenerateForm', 'Rest', + 'Alert', 'ProcessErrors', 'ReturnToCaller', 'ClearScope', 'GetBasePath', 'Wait', 'CreateSelect2', '$state', '$location', 'i18n', - function($scope, $rootScope, $stateParams, UserForm, - GenerateForm, Rest, Alert, ProcessErrors, ReturnToCaller, ClearScope, - GetBasePath, Wait, CreateSelect2, $state, $location, i18n) { - + function($scope, $rootScope, UserForm, GenerateForm, Rest, Alert, + ProcessErrors, ReturnToCaller, ClearScope, GetBasePath, Wait, CreateSelect2, + $state, $location, i18n) { ClearScope(); var defaultUrl = GetBasePath('organizations'), diff --git a/awx/ui/client/src/users/edit/users-edit.controller.js b/awx/ui/client/src/users/edit/users-edit.controller.js index a1255398ed..864ba4ce71 100644 --- a/awx/ui/client/src/users/edit/users-edit.controller.js +++ b/awx/ui/client/src/users/edit/users-edit.controller.js @@ -12,11 +12,10 @@ const user_type_options = [ { type: 'system_administrator', label: N_('System Administrator') }, ]; -export default ['$scope', '$rootScope', '$location', - '$stateParams', 'UserForm', 'Rest', 'ProcessErrors', 'ClearScope', 'GetBasePath', - 'Wait', 'CreateSelect2', '$state', 'i18n', - function($scope, $rootScope, $location, - $stateParams, UserForm, Rest, ProcessErrors, +export default ['$scope', '$rootScope', '$stateParams', 'UserForm', 'Rest', + 'ProcessErrors', 'ClearScope', 'GetBasePath', 'Wait', 'CreateSelect2', + '$state', 'i18n', + function($scope, $rootScope, $stateParams, UserForm, Rest, ProcessErrors, ClearScope, GetBasePath, Wait, CreateSelect2, $state, i18n) { for (var i = 0; i < user_type_options.length; i++) { diff --git a/awx/ui/client/src/users/list/users-list.controller.js b/awx/ui/client/src/users/list/users-list.controller.js index 437690da83..3eb05edb83 100644 --- a/awx/ui/client/src/users/list/users-list.controller.js +++ b/awx/ui/client/src/users/list/users-list.controller.js @@ -12,12 +12,12 @@ const user_type_options = [ { type: 'system_administrator', label: N_('System Administrator') }, ]; -export default ['$scope', '$rootScope', '$stateParams', - 'Rest', 'Alert', 'UserList', 'Prompt', 'ClearScope', 'ProcessErrors', 'GetBasePath', - 'Wait', '$state', '$filter', 'rbacUiControlService', 'Dataset', 'i18n', - function($scope, $rootScope, $stateParams, - Rest, Alert, UserList, Prompt, ClearScope, ProcessErrors, GetBasePath, - Wait, $state, $filter, rbacUiControlService, Dataset, i18n) { +export default ['$scope', '$rootScope', 'Rest', 'UserList', 'Prompt', + 'ClearScope', 'ProcessErrors', 'GetBasePath', 'Wait', '$state', '$filter', + 'rbacUiControlService', 'Dataset', 'i18n', + function($scope, $rootScope, Rest, UserList, Prompt, ClearScope, + ProcessErrors, GetBasePath, Wait, $state, $filter, rbacUiControlService, + Dataset, i18n) { for (var i = 0; i < user_type_options.length; i++) { user_type_options[i].label = i18n._(user_type_options[i].label); diff --git a/awx/ui/client/src/users/main.js b/awx/ui/client/src/users/main.js index 1d978a091b..436c614788 100644 --- a/awx/ui/client/src/users/main.js +++ b/awx/ui/client/src/users/main.js @@ -7,6 +7,8 @@ import UsersList from './list/users-list.controller'; import UsersAdd from './add/users-add.controller'; import UsersEdit from './edit/users-edit.controller'; +import UserForm from './users.form'; +import UserList from './users.list'; import { N_ } from '../i18n'; export default @@ -14,6 +16,8 @@ angular.module('Users', []) .controller('UsersList', UsersList) .controller('UsersAdd', UsersAdd) .controller('UsersEdit', UsersEdit) + .factory('UserForm', UserForm) + .factory('UserList', UserList) .config(['$stateProvider', 'stateDefinitionsProvider', function($stateProvider, stateDefinitionsProvider) { let stateDefinitions = stateDefinitionsProvider.$get(); diff --git a/awx/ui/client/src/forms/Users.js b/awx/ui/client/src/users/users.form.js similarity index 98% rename from awx/ui/client/src/forms/Users.js rename to awx/ui/client/src/users/users.form.js index 0b4f366443..c1a7946a6e 100644 --- a/awx/ui/client/src/forms/Users.js +++ b/awx/ui/client/src/users/users.form.js @@ -10,9 +10,7 @@ * @description This form is for adding/editing users */ -export default - angular.module('UserFormDefinition', []) - .factory('UserForm', ['i18n', function(i18n) { +export default ['i18n', function(i18n) { return { addTitle: i18n._('NEW USER'), @@ -229,4 +227,4 @@ export default } } - };}]); + };}]; diff --git a/awx/ui/client/src/lists/Users.js b/awx/ui/client/src/users/users.list.js similarity index 96% rename from awx/ui/client/src/lists/Users.js rename to awx/ui/client/src/users/users.list.js index 6f9e8ecbe6..c53eb79887 100644 --- a/awx/ui/client/src/lists/Users.js +++ b/awx/ui/client/src/users/users.list.js @@ -5,9 +5,7 @@ *************************************************/ -export default - angular.module('UserListDefinition', []) - .factory('UserList', ['i18n', function(i18n) { +export default ['i18n', function(i18n) { return { name: 'users', @@ -87,4 +85,4 @@ export default ngShow: 'user.summary_fields.user_capabilities.delete' } } - };}]); + };}];