diff options
| author | Pliable Pixels <pliablepixels@users.noreply.github.com> | 2018-10-15 10:42:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-15 10:42:02 -0400 |
| commit | 7d696e85cbe7112ebc2a1b49ee957e42209a404c (patch) | |
| tree | ff8135ee4b1ffeac839c8f3365d5d82e29760d77 /www/js/EventsGraphsCtrl.js | |
| parent | 1cd6c1ba5f1944b411f871bedeb65e93c9530bc4 (diff) | |
| parent | fb73ec7092b1763c4d64148dd8230751e10eec68 (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'www/js/EventsGraphsCtrl.js')
| -rw-r--r-- | www/js/EventsGraphsCtrl.js | 24 |
1 files changed, 12 insertions, 12 deletions
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 }); |
