summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-12-02 15:14:04 -0500
committerPliable Pixels <pliablepixels@gmail.com>2018-12-02 15:14:04 -0500
commit3b5e6ca99ba939c251ae61356e4f2ffe5ef38063 (patch)
treec9932a1a8fad17b51fdb0d9dafb257b91844be9a
parent823af113dde96518f3082d0b87db7b264446e199 (diff)
add option to leave out event detection in getEvents
-rw-r--r--config.xml6
-rw-r--r--package.json4
-rw-r--r--www/js/DataModel.js4
-rw-r--r--www/js/MontageHistoryCtrl.js11
-rw-r--r--www/js/TimelineCtrl.js2
5 files changed, 12 insertions, 15 deletions
diff --git a/config.xml b/config.xml
index 988bd006..bafee0f9 100644
--- a/config.xml
+++ b/config.xml
@@ -163,10 +163,10 @@
<plugin name="cordova-plugin-advanced-websocket" spec="^1.1.3" />
<plugin name="cordova-plugin-network-information" spec="^2.0.1" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.4.1" />
- <plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" />
- <engine name="android" spec="^6.4.0" />
- <engine name="ios" spec="~4.5.5" />
<plugin name="cordova-plugin-ionic-webview" spec="https://github.com/pliablepixels/cordova-plugin-ionic-webview.git">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin>
+ <plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" />
+ <engine name="android" spec="^6.4.0" />
+ <engine name="ios" spec="~4.5.5" />
</widget>
diff --git a/package.json b/package.json
index 43bc2ec6..7d392d54 100644
--- a/package.json
+++ b/package.json
@@ -50,10 +50,10 @@
},
"cordova-plugin-advanced-websocket": {},
"cordova-plugin-x-socialsharing": {},
- "cordova-plugin-media-pp-fork": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
- }
+ },
+ "cordova-plugin-media-pp-fork": {}
}
},
"dependencies": {
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 3814f21d..704a4f05 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -2708,7 +2708,7 @@ angular.module('zmApp.controllers')
// new reminder
//
//https:///zm/api/events.json?&sort=StartTime&direction=desc&page=1
- getEvents: function (monitorId, pageId, loadingStr, startTime, endTime) {
+ getEvents: function (monitorId, pageId, loadingStr, startTime, endTime, noObjectFilter) {
@@ -2746,7 +2746,7 @@ angular.module('zmApp.controllers')
myurl = myurl + "/AlarmFrames >=:" + (loginData.enableAlarmCount ? loginData.minAlarmCount : 0);
//https:///zm/api/events/index/Notes%20REGEXP: detected%3A.json
- if (loginData.objectDetectionFilter) {
+ if (loginData.objectDetectionFilter && !noObjectFilter) {
myurl = myurl + '/Notes REGEXP:detected:';
}
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js
index b9d031c0..c52022f6 100644
--- a/www/js/MontageHistoryCtrl.js
+++ b/www/js/MontageHistoryCtrl.js
@@ -39,12 +39,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
return moment(str).format('MMM Do, YYYY ' + NVRDataModel.getTimeFormat());
};
- function prettifyDate(str) {
- if (NVRDataModel.getLogin().useLocalTimeZone)
- return moment.tz(str, NVRDataModel.getTimeZoneNow()).tz(moment.tz.guess()).format('MMM Do');
- else
- return moment(str).format('MMM Do');
- }
+
$scope.prettifyTime = function (str) {
if (NVRDataModel.getLogin().useLocalTimeZone)
return moment.tz(str, NVRDataModel.getTimeZoneNow()).tz(moment.tz.guess()).format('h:mm a');
@@ -273,11 +268,12 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
function getNextSetHistory() {
// grab events that start on or after the time
- apiurl = ld.apiurl + "/events/index/StartTime >=:" + TimeObjectFrom + "/AlarmFrames >=:" + (ld.enableAlarmCount ? ld.minAlarmCount : 0) + ".json";
+ apiurl = ld.apiurl + "/events/index/StartTime >=:" + TimeObjectFrom + "/AlarmFrames >=:" + (ld.enableAlarmCount ? ld.minAlarmCount : 0) + ".json?sort=StartTime&direction=desc";
NVRDataModel.log("Grabbing history using: " + apiurl);
// make sure there are no more than 5 active streams (noevent is ok)
$scope.currentLimit = $scope.monLimit;
//qHttp.get(apiurl)
+ console.log ("GETTING "+apiurl);
$http({
method: 'get',
url: apiurl
@@ -285,6 +281,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
var data = succ.data;
var ld = NVRDataModel.getLogin();
NVRDataModel.debug("Got " + data.events.length + "new history events...");
+ console.log (JSON.stringify(data));
var eid, mid, stime;
for (i = 0; i < data.events.length; i++) {
mid = data.events[i].Event.MonitorId;
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js
index bfcb34da..1e1b557e 100644
--- a/www/js/TimelineCtrl.js
+++ b/www/js/TimelineCtrl.js
@@ -1123,7 +1123,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
// I am waiting for the full data to load before I draw
var promises = [];
while ((pages <= epData.pageCount) && (iterCount > 0)) {
- var promise = NVRDataModel.getEvents(0, pages, "none", fromDateNoLang, toDateNoLang);
+ var promise = NVRDataModel.getEvents(0, pages, "none", fromDateNoLang, toDateNoLang, true);
promises.push(promise);
pages++;