summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-06-06 19:57:52 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-06-06 19:57:52 -0400
commitd2f53505aea4a7d69b22348807c557786793a07c (patch)
tree8182e1d29534963646227a136412dc93b0c08d37
parent3f519b590d98acd13732818a3341686014f071a7 (diff)
event modal - only show alarm frames with time differences to save memory
-rw-r--r--www/js/EventModalCtrl.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index ebc4bafc..6f5f53b2 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -1730,17 +1730,23 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
$scope.alarm_images = [];
tempAlarms = [];
$scope.FrameArray = data.event.Frame;
+ var ts = 0;
for (i = 0; i < data.event.Frame.length; i++) {
if (data.event.Frame[i].Type == "Alarm") {
// console.log ("**ONLY ALARM AT " + i + "of " + data.event.Frame.length);
- tempAlarms.push({
+ if (ts != data.event.Frame[i].TimeStamp)
+ {
+ tempAlarms.push({
- id: data.event.Frame[i].Id,
- frameid: data.event.Frame[i].FrameId,
- });
+ id: data.event.Frame[i].Id,
+ frameid: data.event.Frame[i].FrameId,
+ });
+ ts = data.event.Frame[i].TimeStamp;
+ }
+
}