diff --git a/awx/ui/client/src/about/about.controller.js b/awx/ui/client/src/about/about.controller.js
index 07bad2dfd6..678b3ba1ff 100644
--- a/awx/ui/client/src/about/about.controller.js
+++ b/awx/ui/client/src/about/about.controller.js
@@ -3,7 +3,7 @@ export default
var processVersion = function(version){
// prettify version & calculate padding
// e,g 3.0.0-0.git201602191743/ -> 3.0.0
- var split = version.split('-')[0]
+ var split = version.split('-')[0];
var spaces = Math.floor((16-split.length)/2),
paddedStr = "";
for(var i=0; i<=spaces; i++){
@@ -13,7 +13,7 @@ export default
for(var j = paddedStr.length; j<16; j++){
paddedStr = paddedStr + " ";
}
- return paddedStr
+ return paddedStr;
};
var init = function(){
CheckLicense.get()
@@ -28,4 +28,4 @@ export default
});
init();
}
- ];
\ No newline at end of file
+ ];
diff --git a/awx/ui/client/src/activity-stream/streamDropdownNav/stream-dropdown-nav.directive.js b/awx/ui/client/src/activity-stream/streamDropdownNav/stream-dropdown-nav.directive.js
index a589a37a83..c9047422f4 100644
--- a/awx/ui/client/src/activity-stream/streamDropdownNav/stream-dropdown-nav.directive.js
+++ b/awx/ui/client/src/activity-stream/streamDropdownNav/stream-dropdown-nav.directive.js
@@ -36,7 +36,7 @@ export default ['templateUrl', function(templateUrl) {
$scope.changeStreamTarget = function(){
- if($scope.streamTarget && $scope.streamTarget == 'dashboard') {
+ if($scope.streamTarget && $scope.streamTarget === 'dashboard') {
// Just navigate to the base activity stream
$state.go('activityStream', {}, {inherit: false});
}
@@ -45,7 +45,7 @@ export default ['templateUrl', function(templateUrl) {
$state.go('activityStream', {target: $scope.streamTarget}, {inherit: false});
}
- }
+ };
}],
};
}];
diff --git a/awx/ui/client/src/adhoc/adhoc.controller.js b/awx/ui/client/src/adhoc/adhoc.controller.js
index cb9e0a648e..a66629fb48 100644
--- a/awx/ui/client/src/adhoc/adhoc.controller.js
+++ b/awx/ui/client/src/adhoc/adhoc.controller.js
@@ -22,6 +22,10 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams,
var privateFn = {};
this.privateFn = privateFn;
+ var id = $stateParams.inventory_id,
+ urls = privateFn.setAvailableUrls(),
+ hostPattern = $rootScope.hostPatterns || "all";
+
// note: put any urls that the controller will use in here!!!!
privateFn.setAvailableUrls = function() {
return {
@@ -31,10 +35,6 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams,
};
};
- var id = $stateParams.inventory_id,
- urls = privateFn.setAvailableUrls(),
- hostPattern = $rootScope.hostPatterns || "all";
-
// set the default options for the selects of the adhoc form
privateFn.setFieldDefaults = function(verbosity_options, forks_default) {
var verbosity;
@@ -164,7 +164,7 @@ function adhocController($q, $scope, $rootScope, $location, $stateParams,
$scope.formCancel = function(){
$state.go('inventoryManage');
- }
+ };
// remove all data input into the form and reset the form back to defaults
$scope.formReset = function () {
diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js
index efd17c9661..c2f5da7214 100644
--- a/awx/ui/client/src/app.js
+++ b/awx/ui/client/src/app.js
@@ -5,12 +5,13 @@
*************************************************/
var urlPrefix;
+var $basePath;
if ($basePath) {
urlPrefix = $basePath;
} else {
// required to make tests work
- var $basePath = '/static/';
+ $basePath = '/static/';
urlPrefix = $basePath;
}
@@ -710,7 +711,7 @@ var tower = angular.module('Tower', [
var sock;
$rootScope.addPermission = function (scope) {
$compile("")(scope);
- }
+ };
$rootScope.deletePermission = function (user, role, userName,
roleName, resourceName) {
@@ -774,16 +775,17 @@ var tower = angular.module('Tower', [
$rootScope.removeConfigReady();
}
$rootScope.removeConfigReady = $rootScope.$on('ConfigReady', function() {
+ var list, id;
// initially set row edit indicator for crud pages
if ($location.$$path && $location.$$path.split("/")[3] && $location.$$path.split("/")[3] === "schedules") {
- var list = $location.$$path.split("/")[3];
- var id = $location.$$path.split("/")[4];
+ list = $location.$$path.split("/")[3];
+ id = $location.$$path.split("/")[4];
$rootScope.listBeingEdited = list;
$rootScope.rowBeingEdited = id;
$rootScope.initialIndicatorLoad = true;
} else if ($location.$$path.split("/")[2]) {
- var list = $location.$$path.split("/")[1];
- var id = $location.$$path.split("/")[2];
+ list = $location.$$path.split("/")[1];
+ id = $location.$$path.split("/")[2];
$rootScope.listBeingEdited = list;
$rootScope.rowBeingEdited = id;
}
@@ -917,13 +919,14 @@ var tower = angular.module('Tower', [
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
// catch license expiration notifications immediately after user logs in, redirect
- if (fromState.name == 'signIn'){
+ if (fromState.name === 'signIn'){
CheckLicense.notify();
}
+ var list, id;
// broadcast event change if editing crud object
if ($location.$$path && $location.$$path.split("/")[3] && $location.$$path.split("/")[3] === "schedules") {
- var list = $location.$$path.split("/")[3];
- var id = $location.$$path.split("/")[4];
+ list = $location.$$path.split("/")[3];
+ id = $location.$$path.split("/")[4];
if (!$rootScope.initialIndicatorLoad) {
delete $rootScope.listBeingEdited;
@@ -934,8 +937,8 @@ var tower = angular.module('Tower', [
$rootScope.$broadcast("EditIndicatorChange", list, id);
} else if ($location.$$path.split("/")[2]) {
- var list = $location.$$path.split("/")[1];
- var id = $location.$$path.split("/")[2];
+ list = $location.$$path.split("/")[1];
+ id = $location.$$path.split("/")[2];
delete $rootScope.listBeingEdited;
delete $rootScope.rowBeingEdited;
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 be7ba6ae14..d68670df97 100644
--- a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js
+++ b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js
@@ -3,7 +3,7 @@ export default
return {
restrict: 'E',
templateUrl: templateUrl('bread-crumb/bread-crumb'),
- link: function(scope, element, attrs) {
+ link: function(scope) {
var streamConfig = {};
@@ -15,15 +15,15 @@ export default
if(streamConfig && streamConfig.activityStream) {
if(streamConfig.activityStreamTarget) {
- stateGoParams['target'] = streamConfig.activityStreamTarget;
+ stateGoParams.target = streamConfig.activityStreamTarget;
}
if(streamConfig.activityStreamId) {
- stateGoParams['id'] = $state.params[streamConfig.activityStreamId];
+ stateGoParams.id = $state.params[streamConfig.activityStreamId];
}
}
$state.go('activityStream', stateGoParams);
- }
+ };
scope.$on("$stateChangeSuccess", function updateActivityStreamButton(event, toState) {
@@ -38,7 +38,7 @@ export default
// attached to the $rootScope.
FeaturesService.get()
- .then(function(features) {
+ .then(function() {
if(FeaturesService.featureEnabled('activity_streams')) {
scope.showActivityStreamButton = true;
}
diff --git a/awx/ui/client/src/controllers/Home.js b/awx/ui/client/src/controllers/Home.js
index 3d8adebad2..8006914355 100644
--- a/awx/ui/client/src/controllers/Home.js
+++ b/awx/ui/client/src/controllers/Home.js
@@ -160,7 +160,6 @@ export function HomeGroups($rootScope, $log, $scope, $filter, $compile, $locatio
list = HomeGroupList,
defaultUrl = GetBasePath('groups'),
scope = $scope,
- modal_scope = $scope.$new(),
opt, PreviousSearchParams;
generator.inject(list, { mode: 'edit', scope: scope });
diff --git a/awx/ui/client/src/controllers/Projects.js b/awx/ui/client/src/controllers/Projects.js
index f4f0081340..a603f69bf2 100644
--- a/awx/ui/client/src/controllers/Projects.js
+++ b/awx/ui/client/src/controllers/Projects.js
@@ -17,8 +17,6 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
SelectionInit, ProjectUpdate, Refresh, Wait, GetChoices, Empty,
Find, GetProjectIcon, GetProjectToolTip, $filter, $state) {
- console.log("foo");
-
ClearScope();
Wait('start');
diff --git a/awx/ui/client/src/controllers/Schedules.js b/awx/ui/client/src/controllers/Schedules.js
index 3245776e64..79cf609d7c 100644
--- a/awx/ui/client/src/controllers/Schedules.js
+++ b/awx/ui/client/src/controllers/Schedules.js
@@ -16,7 +16,7 @@ GetBasePath, Wait, Find, LoadDialogPartial, LoadSchedulesScope, GetChoices) {
ClearScope();
- var base, e, id, url, parentObject;
+ var base, id, url, parentObject;
base = $location.path().replace(/^\//, '').split('/')[0];
diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js
index f4a0e26bfb..68ca5f130d 100644
--- a/awx/ui/client/src/shared/form-generator.js
+++ b/awx/ui/client/src/shared/form-generator.js
@@ -142,10 +142,10 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
.factory('GenerateForm', ['$rootScope', '$location', '$compile', 'generateList',
'SearchWidget', 'PaginateWidget', 'Attr', 'Icon', 'Column',
'NavigationLink', 'HelpCollapse', 'DropDown', 'Empty', 'SelectIcon',
- 'Store', 'ActionButton', 'getSearchHtml', '$state',
+ 'Store', 'ActionButton', 'getSearchHtml',
function ($rootScope, $location, $compile, GenerateList, SearchWidget,
PaginateWidget, Attr, Icon, Column, NavigationLink, HelpCollapse,
- DropDown, Empty, SelectIcon, Store, ActionButton, getSearchHtml, $state) {
+ DropDown, Empty, SelectIcon, Store, ActionButton, getSearchHtml) {
return {
setForm: function (form) { this.form = form; },
@@ -1041,7 +1041,8 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += "ng-model=\"" + fld + '" ';
html += 'name="' + fld + '" ';
html += "class=\"form-control Form-textArea";
- html += (field['elementClass']) ? " " + field['elementClass'] : "";
+ html += (field.class) ? " " + field.class : "";
+ html += (field.elementClass) ? " " + field.elementClass : "";
html += "\" ";
html += (field.ngChange) ? this.attr(field, 'ngChange') : "";
html += buildId(field, fld, this.form);
@@ -1487,8 +1488,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
}
html += "\n";
} else {
- var inSubForm = false;
- var currentSubForm = undefined;
+ var currentSubForm;
var hasSubFormField;
// original, single-column form
section = '';
@@ -1560,7 +1560,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += "
\n";
@@ -1685,7 +1685,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
form = params.form,
itm = params.related,
collection = form.related[itm],
- act, action, fld, cnt, base, fAction;
+ act, fld, cnt, base, fAction;
if (collection.instructions) {
html += "
\n";
@@ -1747,7 +1747,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += "\" id=\"" + collection.iterator + '-' + fld + "-header\" ";
if (!collection.fields[fld].noSort) {
- html += "ng-click=\"sort('" + collection.iterator + "', '" + fld + "')\">"
+ html += "ng-click=\"sort('" + collection.iterator + "', '" + fld + "')\">";
} else {
html += ">";
}
@@ -1768,7 +1768,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
} else {
html += "fa fa-sort";
}
- html += "\">"
+ html += "\">";
}
html += "\n";
diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js
index 68f42dfd9f..a7736f109f 100644
--- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js
+++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js
@@ -297,7 +297,7 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
//
var html = '',
list = this.list,
- base, size, action, fld, cnt, field_action, fAction, itm;
+ base, action, fld, cnt, field_action, fAction, itm;
if (options.mode !== 'lookup') {
if(options.title !== false){