JSLint: Unused variables raise errors

This commit is contained in:
Frédéric Vachon 2015-02-20 14:38:12 -05:00
parent 9025ba7717
commit 86c9cc76d7
15 changed files with 16 additions and 17 deletions

View File

@ -61,7 +61,6 @@ module.exports = function (grunt) {
],
directives: {
node: true,
unparam: true, // TEMPORARY: Ignore unused params
nomen: true,
predef: [ // Global variables
'document', '$', '$get',

View File

@ -13,7 +13,7 @@ angular.module('adagios.live')
})
.factory('getServices', ['$http', 'filterSuffixes',
function ($http, filterSuffixes, columns, filters, apiName) {
function ($http, filterSuffixes) {
return function (columns, filters, apiName) {
var filtersQuery = '';
@ -36,7 +36,7 @@ angular.module('adagios.live')
filtersQuery = createFiltersQuery(filters);
return $http.get('/rest/status/json/' + apiName + '/?fields=' + columns + filtersQuery)
.error(function (data, status, headers, config) {
.error(function () {
throw new Error('getServices : GET Request failed');
});
};

View File

@ -2,7 +2,7 @@
angular.module('adagios.live')
.factory('getProblems', ['$http', function ($http) {
.factory('getProblems', [function () {
var problem_number = 44;
return problem_number;

View File

@ -14,7 +14,7 @@ angular.module("ngJustGage", [])
options: '='
},
template: '<div id="{{id}}-justgage" class="{{class}}"></div>',
link: function (scope, element, attrs) {
link: function (scope) {
$timeout(function () {
var options, key, graph;

View File

@ -2,7 +2,7 @@
angular.module('adagios.sidebar', [])
.controller('SideBarCtrl', ['$scope', '$http', function ($scope, $http) {
.controller('SideBarCtrl', [function () {
angular.noop();
}])

View File

@ -2,7 +2,7 @@
angular.module('adagios.table.cell_duration', ['adagios.table'])
.controller('CellDurationCtrl', ['$scope', function ($scope) {
.controller('CellDurationCtrl', [function () {
angular.noop();
}])

View File

@ -2,7 +2,7 @@
angular.module('adagios.table.cell_host_address', ['adagios.table'])
.controller('CellHostAddressCtrl', ['$scope', function ($scope) {
.controller('CellHostAddressCtrl', [function () {
angular.noop();
}])

View File

@ -2,7 +2,7 @@
angular.module('adagios.table.cell_hosts_host', ['adagios.table'])
.controller('CellHostsHostCtrl', ['$scope', function ($scope) {
.controller('CellHostsHostCtrl', [function () {
angular.noop();
}])

View File

@ -2,7 +2,7 @@
angular.module('adagios.table.cell_last_check', ['adagios.table'])
.controller('CellLastCheckCtrl', ['$scope', function ($scope) {
.controller('CellLastCheckCtrl', [function () {
angular.noop();
}])

View File

@ -16,7 +16,7 @@ angular.module('adagios.table', ['adagios.live',
filters: {},
cellToFieldsMap: {} })
.controller('TableCtrl', ['$scope', 'getServices', 'readConfig', 'tableConfig', function ($scope, getServices, readConfig, tableConfig) {
.controller('TableCtrl', ['$scope', 'getServices', 'tableConfig', function ($scope, getServices, tableConfig) {
var requestFields = [],
filters = JSON.parse(tableConfig.filters),
@ -30,7 +30,7 @@ angular.module('adagios.table', ['adagios.live',
$scope.cellIndexes.push(i);
}
angular.forEach($scope.cellsName, function (key, value) {
angular.forEach($scope.cellsName, function (key) {
angular.forEach(tableConfig.cellToFieldsMap[key], function (_value) {
requestFields.push(_value);
});

View File

@ -2,7 +2,7 @@
angular.module('adagios.tactical.current_health', ['ngRoute', 'ngJustGage' ])
.controller('TacticalCurrentHealth', ['$scope', '$http', function ($scope, $http) {
.controller('TacticalCurrentHealth', ['$scope', function ($scope) {
$scope.hosts = 75.2;
$scope.services = 94.4;
}])

View File

@ -2,7 +2,7 @@
angular.module('adagios.tactical.status_overview', ['ngRoute' ])
.controller('TacticalStatusOverViewCtrl', ['$scope', '$http', function ($scope, $http) {
.controller('TacticalStatusOverViewCtrl', ['$scope', function ($scope) {
$scope.hosts = {
"count": 104,
"problems": 14

View File

@ -5,7 +5,7 @@ angular.module('adagios.tactical', ['adagios.tactical.status_overview',
'adagios.tactical.top_alert_producers'
])
.controller('TacticalCtrl', ['$scope', '$http', function ($scope, $http) {
.controller('TacticalCtrl', [function () {
// Togglable tabs
// Don't follow hyperlinks

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('adagios.tactical.top_alert_producers', ['ngRoute' ])
.controller('TacticalTopAlertProducers', ['$scope', '$http', function ($scope, $http) {
.controller('TacticalTopAlertProducers', ['$scope', function ($scope) {
$scope.hosts = [
{
"host_name": "server-18",

View File

@ -2,7 +2,7 @@
angular.module('adagios.topbar', ['adagios.live'])
.controller('TopBarCtrl', ['$scope', '$http', 'getProblems', function ($scope, $http, getProblems) {
.controller('TopBarCtrl', ['$scope', 'getProblems', function ($scope, getProblems) {
$scope.notifications = getProblems;
}])