diff --git a/awx/ui/client/src/controllers/Projects.js b/awx/ui/client/src/controllers/Projects.js index 380f472a97..e26fcd5ecf 100644 --- a/awx/ui/client/src/controllers/Projects.js +++ b/awx/ui/client/src/controllers/Projects.js @@ -267,7 +267,7 @@ ProjectsList.$inject = ['$scope', '$rootScope', '$location', '$log', '$statePara export function ProjectsAdd($scope, $rootScope, $compile, $location, $log, $stateParams, GenerateForm, ProjectsForm, Rest, Alert, ProcessErrors, - GetBasePath, GetProjectPath, GetChoices, Wait, $state, CreateSelect2) { + GetBasePath, GetProjectPath, GetChoices, Wait, $state, CreateSelect2, i18n) { var form = ProjectsForm(), base = $location.path().replace(/^\//, '').split('/')[0], diff --git a/awx/ui/client/src/forms/Credentials.js b/awx/ui/client/src/forms/Credentials.js index 8f82f75d55..40ecf2da91 100644 --- a/awx/ui/client/src/forms/Credentials.js +++ b/awx/ui/client/src/forms/Credentials.js @@ -51,7 +51,6 @@ export default list: 'OrganizationList', sourceModel: 'organization', sourceField: 'name', - ngClick: 'lookUpOrganization()', awPopOver: i18n._("

If no organization is given, the credential can only be used by the user that creates the credential. Organization admins and system administrators can assign an organization so that roles for the credential can be assigned to users and teams in that organization.

"), dataTitle: i18n._('Organization') + ' ', dataPlacement: 'bottom', diff --git a/awx/ui/client/src/forms/Projects.js b/awx/ui/client/src/forms/Projects.js index 73fcea4e25..ca9d24c6e7 100644 --- a/awx/ui/client/src/forms/Projects.js +++ b/awx/ui/client/src/forms/Projects.js @@ -181,7 +181,7 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition']) }] }, scm_update_cache_timeout: { - label: i18n._('Cache Timeout (seconds)'), + label: i18n._(`Cache Timeout (seconds)`), id: 'scm-cache-timeout', type: 'number', integer: true, diff --git a/awx/ui/client/src/inventories/main.js b/awx/ui/client/src/inventories/main.js index e8cf115725..b904e74bd9 100644 --- a/awx/ui/client/src/inventories/main.js +++ b/awx/ui/client/src/inventories/main.js @@ -182,11 +182,13 @@ angular.module('inventory', [ edit: 'HostEditController' }, resolve: { - host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) { - return HostManageService.get({ id: $stateParams.host_id }).then(function(res) { - return res.data.results[0]; - }); - }] + edit: { + host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) { + return HostManageService.get({ id: $stateParams.host_id }).then(function(res) { + return res.data.results[0]; + }); + }] + } }, ncyBreadcrumb: { label: "{{host.name}}", diff --git a/awx/ui/client/src/inventories/manage/hosts/main.js b/awx/ui/client/src/inventories/manage/hosts/main.js index 8fb523fcc6..6dd1f334a7 100644 --- a/awx/ui/client/src/inventories/manage/hosts/main.js +++ b/awx/ui/client/src/inventories/manage/hosts/main.js @@ -10,50 +10,4 @@ import HostsEditController from './hosts-edit.controller'; export default angular.module('manageHosts', []) .controller('HostsAddController', HostsAddController) - .controller('HostEditController', HostsEditController) - .config(['$stateProvider', 'stateDefinitionsProvider', - function($stateProvider, stateDefinitionsProvider) { - let addHost, editHost, - stateDefinitions = stateDefinitionsProvider.$get(); - addHost = { - name: 'inventoryManage.addHost', - url: '/add-host', - lazyLoad: () => stateDefinitions.generateTree({ - url: '/add-host', - name: 'inventoryManage.addHost', - modes: ['add'], - form: 'HostForm', - controllers: { - add: 'HostsAddController' - } - }) - }; - - editHost = { - name: 'inventoryManage.editHost', - url: '/edit-host/:host_id', - ncyBreadcrumb: { - label: '{{host.name}}', - }, - lazyLoad: () => stateDefinitions.generateTree({ - url: '/edit-host/:host_id', - name: 'inventoryManage.editHost', - modes: ['edit'], - form: 'HostForm', - controllers: { - edit: 'HostEditController' - }, - resolve: { - host: ['$stateParams', 'HostManageService', function($stateParams, HostManageService) { - return HostManageService.get({ id: $stateParams.host_id }).then(function(res) { - return res.data.results[0]; - }); - }] - } - }) - }; - - $stateProvider.state(addHost); - $stateProvider.state(editHost); - } - ]); + .controller('HostEditController', HostsEditController);