diff --git a/awx/ui/client/src/access/roleList.directive.js b/awx/ui/client/src/access/roleList.directive.js index 996a5a51aa..7bdd1b29d4 100644 --- a/awx/ui/client/src/access/roleList.directive.js +++ b/awx/ui/client/src/access/roleList.directive.js @@ -23,7 +23,7 @@ export default return i.role; })) .filter((role) => { - return !!attrs.teamRoleList == !!role.team_id; + return Boolean(attrs.teamRoleList) === Boolean(role.team_id); }) .sort((a, b) => { if (a.name diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js index bfb11e42cc..180bce2ab9 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js +++ b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js @@ -74,7 +74,7 @@ export default var licenseInfo = FeaturesService.getLicenseInfo(); scope.licenseType = licenseInfo ? licenseInfo.license_type : null; if (!licenseInfo) { - console.warn("License info not loaded correctly"); + console.warn("License info not loaded correctly"); // jshint ignore:line } }) .catch(function (response) { diff --git a/awx/ui/client/src/controllers/Users.js b/awx/ui/client/src/controllers/Users.js index 09bde96e87..bd1a8ecfc5 100644 --- a/awx/ui/client/src/controllers/Users.js +++ b/awx/ui/client/src/controllers/Users.js @@ -162,7 +162,7 @@ export function UsersAdd($scope, $rootScope, $compile, $location, $log, generator.reset(); $scope.user_type_options = user_type_options; - $scope.user_type = user_type_options[0] + $scope.user_type = user_type_options[0]; $scope.$watch('user_type', user_type_sync($scope)); CreateSelect2({ @@ -271,7 +271,7 @@ export function UsersEdit($scope, $rootScope, $location, generator.reset(); $scope.user_type_options = user_type_options; - $scope.user_type = user_type_options[0] + $scope.user_type = user_type_options[0]; $scope.$watch('user_type', user_type_sync($scope)); var setScopeFields = function(data){ diff --git a/awx/ui/client/src/helpers/Schedules.js b/awx/ui/client/src/helpers/Schedules.js index ae0c8649c0..72761011a7 100644 --- a/awx/ui/client/src/helpers/Schedules.js +++ b/awx/ui/client/src/helpers/Schedules.js @@ -20,7 +20,7 @@ export default angular.module('SchedulesHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', 'SearchHelper', 'PaginationHelpers', listGenerator.name, 'ModalDialog', 'GeneratorHelpers']) - .factory('EditSchedule', ['SchedulerInit', '$rootScope', 'Wait', 'Rest', + .factory('EditSchedule', ['SchedulerInit', '$rootScope', 'Wait', 'Rest', 'ProcessErrors', 'GetBasePath', 'SchedulePost', '$state', function(SchedulerInit, $rootScope, Wait, Rest, ProcessErrors, GetBasePath, SchedulePost, $state) { @@ -176,7 +176,7 @@ export default }; }]) - .factory('AddSchedule', ['$location', '$rootScope', '$stateParams', + .factory('AddSchedule', ['$location', '$rootScope', '$stateParams', 'SchedulerInit', 'Wait', 'GetBasePath', 'Empty', 'SchedulePost', '$state', 'Rest', 'ProcessErrors', function($location, $rootScope, $stateParams, SchedulerInit, Wait, GetBasePath, Empty, SchedulePost, $state, Rest, @@ -295,8 +295,7 @@ export default }]) .factory('SchedulePost', ['Rest', 'ProcessErrors', 'RRuleToAPI', 'Wait', - 'ToJSON', - function(Rest, ProcessErrors, RRuleToAPI, Wait, ToJSON) { + function(Rest, ProcessErrors, RRuleToAPI, Wait) { return function(params) { var scope = params.scope, url = params.url, @@ -326,8 +325,8 @@ export default schedule.extra_data = JSON.stringify(extra_vars); } else if(scope.extraVars){ - schedule.extra_data = scope.parseType === 'yaml' ? - (scope.extraVars === '---' ? "" : jsyaml.safeLoad(scope.extraVars)) : scope.extraVars; + schedule.extra_data = scope.parseType === 'yaml' ? + (scope.extraVars === '---' ? "" : jsyaml.safeLoad(scope.extraVars)) : scope.extraVars; } Rest.setUrl(url); if (mode === 'add') { diff --git a/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js b/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js index b5969304bc..965b3e67af 100644 --- a/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js +++ b/awx/ui/client/src/inventories/manage/groups/groups-list.controller.js @@ -80,7 +80,7 @@ group_id: id }); }; - $scope.showFailedHosts = function(x, y, z){ + $scope.showFailedHosts = function() { $state.go('inventoryManage', {failed: true}, {reload: true}); }; $scope.scheduleGroup = function(id) { @@ -91,7 +91,7 @@ $scope.$parent.groupsSelected = selection.length > 0 ? true : false; $scope.$parent.groupsSelectedItems = selection.selectedItems; }); - $scope.$on('PostRefresh', () =>{ + $scope.$on('PostRefresh', () => { $scope.groups.forEach( (group, index) => { var group_status, hosts_status; group_status = GetSyncStatusMsg({ diff --git a/awx/ui/client/src/inventories/manage/hosts/main.js b/awx/ui/client/src/inventories/manage/hosts/main.js index 8b71ce162a..0d6aeedd1c 100644 --- a/awx/ui/client/src/inventories/manage/hosts/main.js +++ b/awx/ui/client/src/inventories/manage/hosts/main.js @@ -8,7 +8,7 @@ import {ManageHostsAdd, ManageHostsEdit} from './hosts.route'; export default angular.module('manageHosts', []) - .run(['$stateExtender', '$state', function($stateExtender, $state){ + .run(['$stateExtender', function($stateExtender){ $stateExtender.addState(ManageHostsAdd); $stateExtender.addState(ManageHostsEdit); }]); diff --git a/awx/ui/client/src/inventory-scripts/edit/edit.controller.js b/awx/ui/client/src/inventory-scripts/edit/edit.controller.js index a9515d60a5..c2cb27cf0c 100644 --- a/awx/ui/client/src/inventory-scripts/edit/edit.controller.js +++ b/awx/ui/client/src/inventory-scripts/edit/edit.controller.js @@ -61,7 +61,7 @@ export default data.summary_fields[form.fields[fld].sourceModel][form.fields[fld].sourceField]; } } - $scope.canEdit = data['script'] !== null; + $scope.canEdit = data.script !== null; if (!$scope.canEdit) { $scope.script = "Script contents hidden"; } diff --git a/awx/ui/client/src/job-templates/edit/job-templates-edit.controller.js b/awx/ui/client/src/job-templates/edit/job-templates-edit.controller.js index d3e81e5ebc..c81909c805 100644 --- a/awx/ui/client/src/job-templates/edit/job-templates-edit.controller.js +++ b/awx/ui/client/src/job-templates/edit/job-templates-edit.controller.js @@ -108,7 +108,7 @@ export default } }) .error(function (ret,status_code) { - if (status_code == 403) { + if (status_code === 403) { /* user doesn't have access to see the project, no big deal. */ } else { Alert('Missing Playbooks', 'Unable to retrieve the list of playbooks for this project. Choose a different ' + @@ -198,7 +198,7 @@ export default } }) .error(function (data, status) { - if (status == 403) { + if (status === 403) { /* User doesn't have read access to the project, no problem. */ } else { ProcessErrors($scope, data, status, form, { hdr: 'Error!', msg: 'Failed to get project ' + $scope.project +