From 88fb6ca4af08d69598d4a1db619dccf880a61365 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Fri, 11 Nov 2016 10:40:41 -0500 Subject: [PATCH] Fixed lingering jshint errors --- .../configuration-auth.controller.js | 4 +- .../configuration/configuration.controller.js | 54 +++++++++---------- .../configuration/configuration.service.js | 4 +- .../configurationUtils.service.js | 6 +-- awx/ui/client/src/controllers/Jobs.js | 2 +- 5 files changed, 34 insertions(+), 36 deletions(-) diff --git a/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js b/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js index 3ba3d2fa72..bc9688f4e2 100644 --- a/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js +++ b/awx/ui/client/src/configuration/auth-form/configuration-auth.controller.js @@ -22,7 +22,6 @@ export default [ 'CreateSelect2', 'GenerateForm', 'ParseTypeChange', - 'Wait', function( $scope, $state, @@ -40,8 +39,7 @@ export default [ ConfigurationUtils, CreateSelect2, GenerateForm, - ParseTypeChange, - Wait + ParseTypeChange ) { var authVm = this; diff --git a/awx/ui/client/src/configuration/configuration.controller.js b/awx/ui/client/src/configuration/configuration.controller.js index 1214c994d3..38b180c25d 100644 --- a/awx/ui/client/src/configuration/configuration.controller.js +++ b/awx/ui/client/src/configuration/configuration.controller.js @@ -122,6 +122,30 @@ export default [ $scope.configDataResolve = configDataResolve; + var triggerModal = function(msg, title, buttons) { + if ($scope.removeModalReady) { + $scope.removeModalReady(); + } + $scope.removeModalReady = $scope.$on('ModalReady', function() { + // $('#lookup-save-button').attr('disabled', 'disabled'); + $('#FormModal-dialog').dialog('open'); + }); + + $('#FormModal-dialog').html(msg); + + CreateDialog({ + scope: $scope, + buttons: buttons, + width: 600, + height: 200, + minWidth: 500, + title: title, + id: 'FormModal-dialog', + resizable: false, + callback: 'ModalReady' + }); + }; + function activeTabCheck(setForm) { if(!$scope[formTracker.currentFormName()].$dirty) { active(setForm); @@ -212,7 +236,7 @@ export default [ payload[key] = $scope.configDataResolve[key].default; ConfigurationService.patchConfiguration(payload) - .then(function(data) { + .then(function() { $scope[key] = $scope.configDataResolve[key].default; }) .catch(function(error) { @@ -228,30 +252,6 @@ export default [ }); }; - var triggerModal = function(msg, title, buttons) { - if ($scope.removeModalReady) { - $scope.removeModalReady(); - } - $scope.removeModalReady = $scope.$on('ModalReady', function() { - // $('#lookup-save-button').attr('disabled', 'disabled'); - $('#FormModal-dialog').dialog('open'); - }); - - $('#FormModal-dialog').html(msg); - - CreateDialog({ - scope: $scope, - buttons: buttons, - width: 600, - height: 200, - minWidth: 500, - title: title, - id: 'FormModal-dialog', - resizable: false, - callback: 'ModalReady' - }); - }; - function clearApiErrors() { var currentForm = formDefs[formTracker.getCurrent()]; for (var fld in currentForm.fields) { @@ -332,7 +332,7 @@ export default [ var payload = {}; payload[key] = $scope[key]; ConfigurationService.patchConfiguration(payload) - .then(function(results) { + .then(function() { //TODO consider updating form values with returned data here }) .catch(function(error, status) { @@ -352,7 +352,7 @@ export default [ var resetAll = function() { Wait('start'); ConfigurationService.resetAll() - .then(function(results) { + .then(function() { populateFromApi(); $scope[formTracker.currentFormName].$setPristine(); }) diff --git a/awx/ui/client/src/configuration/configuration.service.js b/awx/ui/client/src/configuration/configuration.service.js index 0438b4501c..5c86f3beae 100644 --- a/awx/ui/client/src/configuration/configuration.service.js +++ b/awx/ui/client/src/configuration/configuration.service.js @@ -4,8 +4,8 @@ * All Rights Reserved *************************************************/ -export default ['GetBasePath', 'ProcessErrors', '$q', '$http', 'Rest', '$rootScope', '$timeout', 'Wait', - function(GetBasePath, ProcessErrors, $q, $http, Rest, $rootScope, $timeout, Wait) { +export default ['GetBasePath', 'ProcessErrors', '$q', '$http', 'Rest', + function(GetBasePath, ProcessErrors, $q, $http, Rest) { var url = GetBasePath('settings'); return { diff --git a/awx/ui/client/src/configuration/configurationUtils.service.js b/awx/ui/client/src/configuration/configurationUtils.service.js index ba6069e3f3..fe8d4f27c0 100644 --- a/awx/ui/client/src/configuration/configurationUtils.service.js +++ b/awx/ui/client/src/configuration/configurationUtils.service.js @@ -8,7 +8,7 @@ export default [ function() { return { - listToArray: function(input, key) { + listToArray: function(input) { if (input.indexOf('\n') !== -1) { //Parse multiline input return input.replace(/^\s+|\s+$/g, "").split('\n'); @@ -17,7 +17,7 @@ export default [ } }, - arrayToList: function(input, key) { + arrayToList: function(input) { var multiLineInput = false; _.each(input, function(statement) { if (statement.indexOf(',') !== -1) { @@ -40,7 +40,7 @@ export default [ return true; }, - formatPlaceholder: function(input, key) { + formatPlaceholder: function(input) { if(input !== null && typeof input === 'object') { if(Array.isArray(input)) { var multiLineInput = false; diff --git a/awx/ui/client/src/controllers/Jobs.js b/awx/ui/client/src/controllers/Jobs.js index 980f440a26..5129efb7d6 100644 --- a/awx/ui/client/src/controllers/Jobs.js +++ b/awx/ui/client/src/controllers/Jobs.js @@ -41,7 +41,7 @@ export function JobsListController($state, $rootScope, $log, $scope, $compile, $ }; $scope.relaunchJob = function(event, id) { - var list, job, typeId; + var job, typeId; try { $(event.target).tooltip('hide'); } catch (e) {