diff options
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 8947df19..5f9a77fd 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1825,6 +1825,12 @@ angular.module('zmApp.controllers') var af = "/AlarmFrames >=:" + (ld.enableAlarmCount ? ld.minAlarmCount : 0); + if (ld.objectDetectionFilter) { + af = af + '/Notes%20REGEXP:detected%3A'; + } + + + var apiurl = ld.apiurl + "/events/consoleEvents/1 hour" + af + ".json"; //NVRDataModel.debug("consoleEvents API:" + apiurl); @@ -2921,6 +2927,17 @@ angular.module('zmApp.controllers') }; + $scope.toggleObjectDetectionFilter = function () { + + var ld = NVRDataModel.getLogin(); + ld.objectDetectionFilter = !ld.objectDetectionFilter; + NVRDataModel.setLogin(ld); + NVRDataModel.debug ("object detection filter: "+ld.objectDetectionFilter); + $scope.loginData = NVRDataModel.getLogin(); + doRefresh(); + + }; + $scope.toggleMinAlarmFrameCount = function () { var ld = NVRDataModel.getLogin(); @@ -3009,6 +3026,8 @@ angular.module('zmApp.controllers') function doRefresh() { // console.log("***Pull to Refresh"); + + NVRDataModel.debug("Reloading monitors"); maxEventsPage = 1; currEventsPage = 1; |
