diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-28 08:37:24 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-09-28 08:37:24 -0400 |
| commit | d8fea09d65e5207ef8c4fafcddd5fc74a7f7be00 (patch) | |
| tree | 40d9528aa2e694624eec48da4eccec7c95aee057 /www/js/EventsGraphsCtrl.js | |
| parent | 776d0d1a52622d5c84411ec3e3d9303ab117a696 (diff) | |
#709 implement native/XHR wrapper, convert all success/error to "then" construct
Diffstat (limited to 'www/js/EventsGraphsCtrl.js')
| -rw-r--r-- | www/js/EventsGraphsCtrl.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/www/js/EventsGraphsCtrl.js b/www/js/EventsGraphsCtrl.js index bfffb351..cad2cc0b 100644 --- a/www/js/EventsGraphsCtrl.js +++ b/www/js/EventsGraphsCtrl.js @@ -190,12 +190,13 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni // console.log("Monitor event URL:" + url); NVRDataModel.log("EventGraph: composed url is " + url); $http.get(url /*,{timeout:15000}*/ ) - .success(function (data) { + .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; - }) - .error(function (data) { + }, + 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 |
