JSLint: Unused variables raise errors
This commit is contained in:
parent
9025ba7717
commit
86c9cc76d7
@ -61,7 +61,6 @@ module.exports = function (grunt) {
|
|||||||
],
|
],
|
||||||
directives: {
|
directives: {
|
||||||
node: true,
|
node: true,
|
||||||
unparam: true, // TEMPORARY: Ignore unused params
|
|
||||||
nomen: true,
|
nomen: true,
|
||||||
predef: [ // Global variables
|
predef: [ // Global variables
|
||||||
'document', '$', '$get',
|
'document', '$', '$get',
|
||||||
|
@ -13,7 +13,7 @@ angular.module('adagios.live')
|
|||||||
})
|
})
|
||||||
|
|
||||||
.factory('getServices', ['$http', 'filterSuffixes',
|
.factory('getServices', ['$http', 'filterSuffixes',
|
||||||
function ($http, filterSuffixes, columns, filters, apiName) {
|
function ($http, filterSuffixes) {
|
||||||
return function (columns, filters, apiName) {
|
return function (columns, filters, apiName) {
|
||||||
var filtersQuery = '';
|
var filtersQuery = '';
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ angular.module('adagios.live')
|
|||||||
filtersQuery = createFiltersQuery(filters);
|
filtersQuery = createFiltersQuery(filters);
|
||||||
|
|
||||||
return $http.get('/rest/status/json/' + apiName + '/?fields=' + columns + filtersQuery)
|
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');
|
throw new Error('getServices : GET Request failed');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.live')
|
angular.module('adagios.live')
|
||||||
|
|
||||||
.factory('getProblems', ['$http', function ($http) {
|
.factory('getProblems', [function () {
|
||||||
var problem_number = 44;
|
var problem_number = 44;
|
||||||
|
|
||||||
return problem_number;
|
return problem_number;
|
||||||
|
@ -14,7 +14,7 @@ angular.module("ngJustGage", [])
|
|||||||
options: '='
|
options: '='
|
||||||
},
|
},
|
||||||
template: '<div id="{{id}}-justgage" class="{{class}}"></div>',
|
template: '<div id="{{id}}-justgage" class="{{class}}"></div>',
|
||||||
link: function (scope, element, attrs) {
|
link: function (scope) {
|
||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
var options, key, graph;
|
var options, key, graph;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.sidebar', [])
|
angular.module('adagios.sidebar', [])
|
||||||
|
|
||||||
.controller('SideBarCtrl', ['$scope', '$http', function ($scope, $http) {
|
.controller('SideBarCtrl', [function () {
|
||||||
angular.noop();
|
angular.noop();
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.table.cell_duration', ['adagios.table'])
|
angular.module('adagios.table.cell_duration', ['adagios.table'])
|
||||||
|
|
||||||
.controller('CellDurationCtrl', ['$scope', function ($scope) {
|
.controller('CellDurationCtrl', [function () {
|
||||||
angular.noop();
|
angular.noop();
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.table.cell_host_address', ['adagios.table'])
|
angular.module('adagios.table.cell_host_address', ['adagios.table'])
|
||||||
|
|
||||||
.controller('CellHostAddressCtrl', ['$scope', function ($scope) {
|
.controller('CellHostAddressCtrl', [function () {
|
||||||
angular.noop();
|
angular.noop();
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.table.cell_hosts_host', ['adagios.table'])
|
angular.module('adagios.table.cell_hosts_host', ['adagios.table'])
|
||||||
|
|
||||||
.controller('CellHostsHostCtrl', ['$scope', function ($scope) {
|
.controller('CellHostsHostCtrl', [function () {
|
||||||
angular.noop();
|
angular.noop();
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.table.cell_last_check', ['adagios.table'])
|
angular.module('adagios.table.cell_last_check', ['adagios.table'])
|
||||||
|
|
||||||
.controller('CellLastCheckCtrl', ['$scope', function ($scope) {
|
.controller('CellLastCheckCtrl', [function () {
|
||||||
angular.noop();
|
angular.noop();
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ angular.module('adagios.table', ['adagios.live',
|
|||||||
filters: {},
|
filters: {},
|
||||||
cellToFieldsMap: {} })
|
cellToFieldsMap: {} })
|
||||||
|
|
||||||
.controller('TableCtrl', ['$scope', 'getServices', 'readConfig', 'tableConfig', function ($scope, getServices, readConfig, tableConfig) {
|
.controller('TableCtrl', ['$scope', 'getServices', 'tableConfig', function ($scope, getServices, tableConfig) {
|
||||||
|
|
||||||
var requestFields = [],
|
var requestFields = [],
|
||||||
filters = JSON.parse(tableConfig.filters),
|
filters = JSON.parse(tableConfig.filters),
|
||||||
@ -30,7 +30,7 @@ angular.module('adagios.table', ['adagios.live',
|
|||||||
$scope.cellIndexes.push(i);
|
$scope.cellIndexes.push(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
angular.forEach($scope.cellsName, function (key, value) {
|
angular.forEach($scope.cellsName, function (key) {
|
||||||
angular.forEach(tableConfig.cellToFieldsMap[key], function (_value) {
|
angular.forEach(tableConfig.cellToFieldsMap[key], function (_value) {
|
||||||
requestFields.push(_value);
|
requestFields.push(_value);
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.tactical.current_health', ['ngRoute', 'ngJustGage' ])
|
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.hosts = 75.2;
|
||||||
$scope.services = 94.4;
|
$scope.services = 94.4;
|
||||||
}])
|
}])
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.tactical.status_overview', ['ngRoute' ])
|
angular.module('adagios.tactical.status_overview', ['ngRoute' ])
|
||||||
|
|
||||||
.controller('TacticalStatusOverViewCtrl', ['$scope', '$http', function ($scope, $http) {
|
.controller('TacticalStatusOverViewCtrl', ['$scope', function ($scope) {
|
||||||
$scope.hosts = {
|
$scope.hosts = {
|
||||||
"count": 104,
|
"count": 104,
|
||||||
"problems": 14
|
"problems": 14
|
||||||
|
@ -5,7 +5,7 @@ angular.module('adagios.tactical', ['adagios.tactical.status_overview',
|
|||||||
'adagios.tactical.top_alert_producers'
|
'adagios.tactical.top_alert_producers'
|
||||||
])
|
])
|
||||||
|
|
||||||
.controller('TacticalCtrl', ['$scope', '$http', function ($scope, $http) {
|
.controller('TacticalCtrl', [function () {
|
||||||
|
|
||||||
// Togglable tabs
|
// Togglable tabs
|
||||||
// Don't follow hyperlinks
|
// Don't follow hyperlinks
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('adagios.tactical.top_alert_producers', ['ngRoute' ])
|
angular.module('adagios.tactical.top_alert_producers', ['ngRoute' ])
|
||||||
.controller('TacticalTopAlertProducers', ['$scope', '$http', function ($scope, $http) {
|
.controller('TacticalTopAlertProducers', ['$scope', function ($scope) {
|
||||||
$scope.hosts = [
|
$scope.hosts = [
|
||||||
{
|
{
|
||||||
"host_name": "server-18",
|
"host_name": "server-18",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
angular.module('adagios.topbar', ['adagios.live'])
|
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;
|
$scope.notifications = getProblems;
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user