mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
JSHint fixes
This commit is contained in:
parent
240b35c8d4
commit
22300347f0
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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){
|
||||
|
||||
@ -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') {
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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);
|
||||
}]);
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
@ -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 +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user