From deeec5ff33576e3b57bce7dd24db6aa0d67eb90b Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 15 Oct 2018 09:49:34 -0400 Subject: beautify --- www/js/EventsGraphsCtrl.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'www/js/EventsGraphsCtrl.js') diff --git a/www/js/EventsGraphsCtrl.js b/www/js/EventsGraphsCtrl.js index cad2cc0b..8174f7e0 100644 --- a/www/js/EventsGraphsCtrl.js +++ b/www/js/EventsGraphsCtrl.js @@ -191,18 +191,18 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni NVRDataModel.log("EventGraph: composed url is " + url); $http.get(url /*,{timeout:15000}*/ ) .then(function (data) { - data = data.data; - NVRDataModel.debug("Event count for monitor" + - monitors[j].Monitor.Id + " is " + data.pagination.count); - $scope.chart.data.datasets[0].data[j] = data.pagination.count; - }, - function (data) { - // ideally I should be treating it as an error - // but what I am really doing now is treating it like no events - // works but TBD: make this into a proper error handler - $scope.chart.data.datasets[0].data[j] = 0; - NVRDataModel.log("Error retrieving events for graph " + JSON.stringify(data), "error"); - }); + data = data.data; + NVRDataModel.debug("Event count for monitor" + + monitors[j].Monitor.Id + " is " + data.pagination.count); + $scope.chart.data.datasets[0].data[j] = data.pagination.count; + }, + function (data) { + // ideally I should be treating it as an error + // but what I am really doing now is treating it like no events + // works but TBD: make this into a proper error handler + $scope.chart.data.datasets[0].data[j] = 0; + NVRDataModel.log("Error retrieving events for graph " + JSON.stringify(data), "error"); + }); })(i); // j } //for }); -- cgit v1.2.3