mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 11:40:05 -03:30
Merge pull request #3955 from mabashian/jshint-fixes
Fixed lingering jshint errors
This commit is contained in:
@@ -22,7 +22,6 @@ export default [
|
|||||||
'CreateSelect2',
|
'CreateSelect2',
|
||||||
'GenerateForm',
|
'GenerateForm',
|
||||||
'ParseTypeChange',
|
'ParseTypeChange',
|
||||||
'Wait',
|
|
||||||
function(
|
function(
|
||||||
$scope,
|
$scope,
|
||||||
$state,
|
$state,
|
||||||
@@ -40,8 +39,7 @@ export default [
|
|||||||
ConfigurationUtils,
|
ConfigurationUtils,
|
||||||
CreateSelect2,
|
CreateSelect2,
|
||||||
GenerateForm,
|
GenerateForm,
|
||||||
ParseTypeChange,
|
ParseTypeChange
|
||||||
Wait
|
|
||||||
) {
|
) {
|
||||||
var authVm = this;
|
var authVm = this;
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,30 @@ export default [
|
|||||||
|
|
||||||
$scope.configDataResolve = configDataResolve;
|
$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) {
|
function activeTabCheck(setForm) {
|
||||||
if(!$scope[formTracker.currentFormName()].$dirty) {
|
if(!$scope[formTracker.currentFormName()].$dirty) {
|
||||||
active(setForm);
|
active(setForm);
|
||||||
@@ -212,7 +236,7 @@ export default [
|
|||||||
payload[key] = $scope.configDataResolve[key].default;
|
payload[key] = $scope.configDataResolve[key].default;
|
||||||
|
|
||||||
ConfigurationService.patchConfiguration(payload)
|
ConfigurationService.patchConfiguration(payload)
|
||||||
.then(function(data) {
|
.then(function() {
|
||||||
$scope[key] = $scope.configDataResolve[key].default;
|
$scope[key] = $scope.configDataResolve[key].default;
|
||||||
})
|
})
|
||||||
.catch(function(error) {
|
.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() {
|
function clearApiErrors() {
|
||||||
var currentForm = formDefs[formTracker.getCurrent()];
|
var currentForm = formDefs[formTracker.getCurrent()];
|
||||||
for (var fld in currentForm.fields) {
|
for (var fld in currentForm.fields) {
|
||||||
@@ -332,7 +332,7 @@ export default [
|
|||||||
var payload = {};
|
var payload = {};
|
||||||
payload[key] = $scope[key];
|
payload[key] = $scope[key];
|
||||||
ConfigurationService.patchConfiguration(payload)
|
ConfigurationService.patchConfiguration(payload)
|
||||||
.then(function(results) {
|
.then(function() {
|
||||||
//TODO consider updating form values with returned data here
|
//TODO consider updating form values with returned data here
|
||||||
})
|
})
|
||||||
.catch(function(error, status) {
|
.catch(function(error, status) {
|
||||||
@@ -352,7 +352,7 @@ export default [
|
|||||||
var resetAll = function() {
|
var resetAll = function() {
|
||||||
Wait('start');
|
Wait('start');
|
||||||
ConfigurationService.resetAll()
|
ConfigurationService.resetAll()
|
||||||
.then(function(results) {
|
.then(function() {
|
||||||
populateFromApi();
|
populateFromApi();
|
||||||
$scope[formTracker.currentFormName].$setPristine();
|
$scope[formTracker.currentFormName].$setPristine();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
export default ['GetBasePath', 'ProcessErrors', '$q', '$http', 'Rest', '$rootScope', '$timeout', 'Wait',
|
export default ['GetBasePath', 'ProcessErrors', '$q', '$http', 'Rest',
|
||||||
function(GetBasePath, ProcessErrors, $q, $http, Rest, $rootScope, $timeout, Wait) {
|
function(GetBasePath, ProcessErrors, $q, $http, Rest) {
|
||||||
var url = GetBasePath('settings');
|
var url = GetBasePath('settings');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default [
|
|||||||
function() {
|
function() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
listToArray: function(input, key) {
|
listToArray: function(input) {
|
||||||
if (input.indexOf('\n') !== -1) {
|
if (input.indexOf('\n') !== -1) {
|
||||||
//Parse multiline input
|
//Parse multiline input
|
||||||
return input.replace(/^\s+|\s+$/g, "").split('\n');
|
return input.replace(/^\s+|\s+$/g, "").split('\n');
|
||||||
@@ -17,7 +17,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
arrayToList: function(input, key) {
|
arrayToList: function(input) {
|
||||||
var multiLineInput = false;
|
var multiLineInput = false;
|
||||||
_.each(input, function(statement) {
|
_.each(input, function(statement) {
|
||||||
if (statement.indexOf(',') !== -1) {
|
if (statement.indexOf(',') !== -1) {
|
||||||
@@ -40,7 +40,7 @@ export default [
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
formatPlaceholder: function(input, key) {
|
formatPlaceholder: function(input) {
|
||||||
if(input !== null && typeof input === 'object') {
|
if(input !== null && typeof input === 'object') {
|
||||||
if(Array.isArray(input)) {
|
if(Array.isArray(input)) {
|
||||||
var multiLineInput = false;
|
var multiLineInput = false;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export function JobsListController($state, $rootScope, $log, $scope, $compile, $
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.relaunchJob = function(event, id) {
|
$scope.relaunchJob = function(event, id) {
|
||||||
var list, job, typeId;
|
var job, typeId;
|
||||||
try {
|
try {
|
||||||
$(event.target).tooltip('hide');
|
$(event.target).tooltip('hide');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user