diff --git a/app/components/host/host_info/host_info.js b/app/components/host/host_info/host_info.js index ad282af..d7e18bd 100644 --- a/app/components/host/host_info/host_info.js +++ b/app/components/host/host_info/host_info.js @@ -3,10 +3,10 @@ angular.module('adagios.host.info', []) .controller('HostInfoCtrl', ['$scope', function ($scope) { - $scope.active_checks = ($scope.data.live.active_checks_enabled === '1') ? 'Enabled': 'Disabled'; - $scope.notifications_enabled = ($scope.data.config.notifications_enabled === '1') ? 'Enabled': 'Disabled'; - $scope.event_handler_enabled = ($scope.data.config.event_handler_enabled === '1') ? 'Enabled': 'Disabled'; - $scope.flap_detection_enabled = ($scope.data.config.flap_detection_enabled === '1') ? 'Enabled': 'Disabled'; + $scope.active_checks = ($scope.data.live.active_checks_enabled === '1') ? 'Enabled' : 'Disabled'; + $scope.notifications_enabled = ($scope.data.config.notifications_enabled === '1') ? 'Enabled' : 'Disabled'; + $scope.event_handler_enabled = ($scope.data.config.event_handler_enabled === '1') ? 'Enabled' : 'Disabled'; + $scope.flap_detection_enabled = ($scope.data.config.flap_detection_enabled === '1') ? 'Enabled' : 'Disabled'; }]) .directive('adgHostInfo', function () { diff --git a/app/components/service/service.js b/app/components/service/service.js index 35509f4..7ce97e1 100644 --- a/app/components/service/service.js +++ b/app/components/service/service.js @@ -9,8 +9,7 @@ angular.module('adagios.service', ['adagios.live', .controller('ServiceCtrl', ['$scope', 'serviceConfig', 'getService', function ($scope, serviceConfig, getService) { - var objectType = 'service', - hostName = serviceConfig.hostName, + var hostName = serviceConfig.hostName, description = serviceConfig.description; getService(hostName, description).success(function (data) { diff --git a/app/components/service/service_info/service_info.js b/app/components/service/service_info/service_info.js index 7c8cc05..24095df 100644 --- a/app/components/service/service_info/service_info.js +++ b/app/components/service/service_info/service_info.js @@ -3,7 +3,7 @@ angular.module('adagios.service.info', []) .controller('ServiceInfoCtrl', ['$scope', function ($scope) { - $scope.acknowledged = $scope.data[0].acknowledged === "1" ? "Yes": "No"; + $scope.acknowledged = $scope.data[0].acknowledged === "1" ? "Yes" : "No"; }]) .directive('adgServiceInfo', function () { diff --git a/app/components/service/service_metrics/service_metrics.js b/app/components/service/service_metrics/service_metrics.js index 32653df..46b7f9f 100644 --- a/app/components/service/service_metrics/service_metrics.js +++ b/app/components/service/service_metrics/service_metrics.js @@ -3,6 +3,7 @@ angular.module('adagios.service.metrics', []) .controller('ServiceMetricsCtrl', ['$scope', function ($scope) { + angular.noop(); }]) .directive('adgServiceMetrics', function () { diff --git a/app/components/tactical/tactical.js b/app/components/tactical/tactical.js index 3da0a2e..9b1184b 100644 --- a/app/components/tactical/tactical.js +++ b/app/components/tactical/tactical.js @@ -18,7 +18,9 @@ angular.module('adagios.tactical', ['adagios.live', .controller('TacticalCtrl', ['$scope', '$interval', 'tacticalConfig', 'getHostProblems', 'getServiceProblems', 'getTotalHosts', 'getTotalServices', 'addAjaxPromise', - function ($scope, $interval, tacticalConfig, getHostProblems, getServiceProblems, getTotalHosts, getTotalServices, addAjaxPromise) { + function ($scope, $interval, tacticalConfig, getHostProblems, getServiceProblems, getTotalHosts, + getTotalServices, addAjaxPromise) { + var getData; $scope.statusOverview = tacticalConfig.statusOverview; @@ -32,7 +34,7 @@ angular.module('adagios.tactical', ['adagios.live', $scope.serviceProblems = 0; $scope.totalServices = 0; - getData= function () { + getData = function () { getHostProblems().success(function (data) { $scope.hostProblems = data.length; getTotalHosts().success(function (data) { @@ -48,7 +50,7 @@ angular.module('adagios.tactical', ['adagios.live', $scope.servicesRatio = ($scope.totalServices - $scope.serviceProblems) / $scope.totalServices * 100; }); }); - } + }; if (tacticalConfig.refreshInterval !== 0) { addAjaxPromise( diff --git a/app/templates/service/service.js b/app/templates/service/service.js index 2965ea2..3bc4636 100644 --- a/app/templates/service/service.js +++ b/app/templates/service/service.js @@ -3,7 +3,7 @@ angular.module("adagios.view.service", [ "adagios.live" ]) .controller("ServiceViewCtrl", [ "$scope", "$routeParams", - function($scope, $routeParams) { + function ($scope, $routeParams) { if (!$routeParams.host_name || !$routeParams.description) { throw new Error("ERROR :'host_name' and 'description' GET parameters must be set");