diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 86f807048a..e1ca78014d 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -40,7 +40,7 @@ import {ScheduleEditController} from 'tower/controllers/Schedules'; import {ProjectsList, ProjectsAdd, ProjectsEdit} from 'tower/controllers/Projects'; import {OrganizationsList, OrganizationsAdd, OrganizationsEdit} from 'tower/controllers/Organizations'; import {InventoriesList, InventoriesAdd, InventoriesEdit, InventoriesManage} from 'tower/controllers/Inventories'; -import {AdhocForm} from 'tower/controllers/Adhoc'; +import {AdhocCtrl} from 'tower/controllers/Adhoc'; import {AdminsList} from 'tower/controllers/Admins'; import {UsersList, UsersAdd, UsersEdit} from 'tower/controllers/Users'; import {TeamsList, TeamsAdd, TeamsEdit} from 'tower/controllers/Teams'; @@ -290,7 +290,7 @@ var tower = angular.module('Tower', [ when('/inventories/:inventory_id/adhoc', { templateUrl: urlPrefix + 'partials/adhoc.html', - controller: AdhocForm + controller: AdhocCtrl }). when('/organizations', { diff --git a/awx/ui/static/js/controllers/Adhoc.js b/awx/ui/static/js/controllers/Adhoc.js index ef6954bfe8..594f93ab3e 100644 --- a/awx/ui/static/js/controllers/Adhoc.js +++ b/awx/ui/static/js/controllers/Adhoc.js @@ -11,15 +11,15 @@ * @name controllers.function:Adhoc * @description This controller controls the adhoc form creation, command launching and navigating to standard out after command has been succesfully ran. */ -export function AdhocForm($scope, $rootScope, $location, $routeParams, +export function AdhocCtrl($scope, $rootScope, $location, $routeParams, AdhocForm, GenerateForm, Rest, ProcessErrors, ClearScope, GetBasePath, GetChoices, KindChange, LookUpInit, CredentialList, Empty, OwnerChange, LoginMethodChange, Wait) { ClearScope(); - var url = GetBasePath('inventory') + $routeParams.inventory_id - + '/ad_hoc_commands/', + var url = GetBasePath('inventory') + $routeParams.inventory_id + + '/ad_hoc_commands/', generator = GenerateForm, form = AdhocForm, master = {}, @@ -33,8 +33,8 @@ export function AdhocForm($scope, $rootScope, $location, $routeParams, // display Wait('start'); $scope.id = id; - $scope.argsPopOver = "

These arguments are used with the" - + " specified module.

"; + $scope.argsPopOver = "

These arguments are used with the" + + " specified module.

"; // fix arguments help popover based on the module selected $scope.moduleChange = function () { // NOTE: for selenium testing link - @@ -42,18 +42,18 @@ export function AdhocForm($scope, $rootScope, $location, $routeParams, // only when a module is selected if ($scope.module_name) { // give the docs for the selected module - $scope.argsPopOver = "

These arguments are used with the" - + " specified module. You can find information about the " - + $scope.module_name.value - + " here.

"; + $scope.argsPopOver = "

These arguments are used with the" + + " specified module. You can find information about the " + + $scope.module_name.value + + " here.

"; } else { // no module selected - $scope.argsPopOver = "

These arguments are used with the" - + " specified module.

"; + $scope.argsPopOver = "

These arguments are used with the" + + " specified module.

"; } }; @@ -127,7 +127,7 @@ export function AdhocForm($scope, $rootScope, $location, $routeParams, // populate data with the relevant form values for (fld in form.fields) { if (form.fields[fld].type === 'select') { - data[fld] = $scope[fld].value + data[fld] = $scope[fld].value; } else { data[fld] = $scope[fld]; } @@ -144,8 +144,8 @@ export function AdhocForm($scope, $rootScope, $location, $routeParams, }) .error(function (data, status) { ProcessErrors($scope, data, status, form, { hdr: 'Error!', - msg: 'Failed to launch adhoc command. POST returned status: ' - + status }); + msg: 'Failed to launch adhoc command. POST returned status: ' + + status }); // TODO: still need to implement popping up a password prompt // if the credential requires it. The way that the current end- // point works is that I find out if I need to ask for a @@ -167,7 +167,7 @@ export function AdhocForm($scope, $rootScope, $location, $routeParams, }; } -AdhocForm.$inject = ['$scope', '$rootScope', '$location', '$routeParams', +AdhocCtrl.$inject = ['$scope', '$rootScope', '$location', '$routeParams', 'AdhocForm', 'GenerateForm', 'Rest', 'ProcessErrors', 'ClearScope', 'GetBasePath', 'GetChoices', 'KindChange', 'LookUpInit', 'CredentialList', 'Empty', 'OwnerChange', 'LoginMethodChange', 'Wait']; diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index 8e6a87c25a..eb6ee30072 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -910,12 +910,12 @@ export function InventoriesManage ($log, $scope, $rootScope, $location, $scope.populateAdhocForm = function() { var host_patterns = "all"; if ($scope.hostsSelected || $scope.groupsSelected) { - var allSelectedItems = $scope.groupsSelectedItems.concat($scope.hostsSelectedItems) + var allSelectedItems = $scope.groupsSelectedItems.concat($scope.hostsSelectedItems); host_patterns = _.pluck(allSelectedItems, "name").join(":"); } $rootScope.hostPatterns = host_patterns; $location.path('/inventories/' + $scope.inventory.id + '/adhoc'); - } + }; $scope.refreshHostsOnGroupRefresh = false; $scope.selected_group_id = null; diff --git a/awx/ui/static/js/forms/Adhoc.js b/awx/ui/static/js/forms/Adhoc.js index 6ab3bfb065..fcfa26590b 100644 --- a/awx/ui/static/js/forms/Adhoc.js +++ b/awx/ui/static/js/forms/Adhoc.js @@ -24,12 +24,12 @@ export default label: 'Module', excludeModal: true, type: 'select', - ngOptions: 'module.label for module in adhoc_module_options' - + ' track by module.value', + ngOptions: 'module.label for module in adhoc_module_options' + + ' track by module.value', ngChange: 'moduleChange()', editRequired: true, - awPopOver:'

These are the modules that Tower supports ' - + 'running commands against.', + awPopOver:'

These are the modules that Tower supports ' + + 'running commands against.', dataTitle: 'Module', dataPlacement: 'right', dataContainer: 'body' @@ -50,13 +50,13 @@ export default type: 'text', addRequired: false, editRequired: false, - awPopOver: '

The pattern used to target hosts in the ' - + 'inventory. Leaving the field blank, all, and * will ' - + 'all target all hosts in the inventory. You can find ' - + 'more information about Ansible\'s host patterns ' - + 'here.

', + awPopOver: '

The pattern used to target hosts in the ' + + 'inventory. Leaving the field blank, all, and * will ' + + 'all target all hosts in the inventory. You can find ' + + 'more information about Ansible\'s host patterns ' + + 'here.

', dataTitle: 'Host Pattern', dataPlacement: 'right', dataContainer: 'body' @@ -67,11 +67,11 @@ export default sourceModel: 'credential', sourceField: 'name', ngClick: 'lookUpCredential()', - awPopOver: '

Select the credential you want to use when ' - + 'accessing the remote hosts to run the command. ' - + 'Choose the credential containing ' - + 'the username and SSH key or password that Ansbile ' - + 'will need to log into the remote hosts.

', + awPopOver: '

Select the credential you want to use when ' + + 'accessing the remote hosts to run the command. ' + + 'Choose the credential containing ' + + 'the username and SSH key or password that Ansbile ' + + 'will need to log into the remote hosts.

', dataTitle: 'Credential', dataPlacement: 'right', dataContainer: 'body', diff --git a/awx/ui/static/js/helpers/Adhoc.js b/awx/ui/static/js/helpers/Adhoc.js index 371dd0c497..3afe7d4584 100644 --- a/awx/ui/static/js/helpers/Adhoc.js +++ b/awx/ui/static/js/helpers/Adhoc.js @@ -43,7 +43,6 @@ export default var id = params.project_id, scope = params.scope.$new(), new_job_id, - launch_url, html, url; @@ -63,9 +62,9 @@ export default .error(function (data, status) { ProcessErrors(scope, data, status, null, { hdr: 'Error!', - msg: 'Call to ' + url - + ' failed. DELETE returned status: ' - + status }); + msg: 'Call to ' + url + + ' failed. DELETE returned status: ' + + status }); }); }); @@ -124,8 +123,7 @@ export default Rest.setUrl(url); Rest.get() .success(function (data) { - var new_job_id = data.id, - launch_url = url; + new_job_id = data.id; scope.passwords_needed_to_start = data.passwords_needed_to_start; if (!Empty(data.passwords_needed_to_start) && diff --git a/awx/ui/static/js/helpers/Permissions.js b/awx/ui/static/js/helpers/Permissions.js index 9ef24a086d..056f11bb10 100644 --- a/awx/ui/static/js/helpers/Permissions.js +++ b/awx/ui/static/js/helpers/Permissions.js @@ -26,42 +26,42 @@ export default scope.projectrequired = false; html = "
\n" + "
Read
\n" + - "
Only allow the user or team to view the inventory." - + "
\n" + + "
Only allow the user or team to view the inventory." + + "
\n" + "
Write
\n" + - "
Allow the user or team to modify hosts and groups " - + "contained in the inventory, add new hosts and groups" - + ", and perform inventory sync operations.\n" + + "
Allow the user or team to modify hosts and groups " + + "contained in the inventory, add new hosts and groups" + + ", and perform inventory sync operations.\n" + "
Admin
\n" + - "
Allow the user or team full access to the " - + "inventory. This includes reading, writing, deletion " - + "of the inventory, inventory sync operations, and " - + "the ability to execute commands on the inventory." - + "
\n" + + "
Allow the user or team full access to the " + + "inventory. This includes reading, writing, deletion " + + "of the inventory, inventory sync operations, and " + + "the ability to execute commands on the inventory." + + "
\n" + "
Execute commands
\n" + - "
Allow the user to execute commands on the " - + "inventory.
\n" + + "
Allow the user to execute commands on the " + + "inventory.
\n" + "
\n"; scope.permissionTypeHelp = $sce.trustAsHtml(html); } else { scope.projectrequired = true; html = "
\n" + "
Create
\n" + - "
Allow the user or team to create job templates. " - + "This implies that they have the Run and Check " - + "permissions.
\n" + + "
Allow the user or team to create job templates. " + + "This implies that they have the Run and Check " + + "permissions.
\n" + "
Run
\n" + - "
Allow the user or team to run a job template from " - + "the project against the inventory. In Run mode " - + "modules will " + - "be executed, and changes to the inventory will occur." - + "
\n" + + "
Allow the user or team to run a job template from " + + "the project against the inventory. In Run mode " + + "modules will " + + "be executed, and changes to the inventory will occur." + + "
\n" + "
Check
\n" + - "
Only allow the user or team to run the project " - + "against the inventory as a dry-run operation. In " - + "Check mode, module operations " + - "will only be simulated. No changes will occur." - + "
\n" + + "
Only allow the user or team to run the project " + + "against the inventory as a dry-run operation. In " + + "Check mode, module operations " + + "will only be simulated. No changes will occur." + + "
\n" + "
\n"; scope.permissionTypeHelp = $sce.trustAsHtml(html); } diff --git a/awx/ui/static/js/lists/InventoryGroups.js b/awx/ui/static/js/lists/InventoryGroups.js index 3f5351bc58..f5ab0b4387 100644 --- a/awx/ui/static/js/lists/InventoryGroups.js +++ b/awx/ui/static/js/lists/InventoryGroups.js @@ -146,8 +146,8 @@ export default ngClick: 'updateGroup(group.id)', awToolTip: "{{ group.launch_tooltip }}", dataTipWatch: "group.launch_tooltip", - ngShow: "group.status !== 'running' && group.status " - + "!== 'pending' && group.status !== 'updating'", + ngShow: "group.status !== 'running' && group.status " + + "!== 'pending' && group.status !== 'updating'", ngClass: "group.launch_class", dataPlacement: "top" }, @@ -157,8 +157,8 @@ export default ngClick: "cancelUpdate(group.id)", awToolTip: "Cancel sync process", 'class': 'red-txt', - ngShow: "group.status == 'running' || group.status == 'pending' " - + "|| group.status == 'updating'", + ngShow: "group.status == 'running' || group.status == 'pending' " + + "|| group.status == 'updating'", dataPlacement: "top" }, edit: {