From 1f404962fd9d20c0ff25d026ce2af2f8f6840120 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Wed, 27 Jan 2016 16:32:02 -0500 Subject: #154 - montage history updates Former-commit-id: 42cd82e17eef928d53b568989a143842d492b59f --- www/css/style.css | 16 ++- www/js/DataModel.js | 2 +- www/js/MontageHistoryCtrl.js | 208 ++++++++++++++++++++++++++++++++----- www/js/app.js | 1 + www/templates/montage-history.html | 145 +++++++++++++------------- 5 files changed, 270 insertions(+), 102 deletions(-) (limited to 'www') diff --git a/www/css/style.css b/www/css/style.css index ffda637f..52e5ad08 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -108,16 +108,26 @@ Credit: https://css-tricks.com/snippets/css/a-guide-to-flexbox/ border-color: #444444; border-style: solid; border-width:1px; - opactity:80%; + opacity:80%; } +.header-event-id { + background: #9b59b6; + color:#cccccc; + border-color: #9b59b6; + border-style: solid; + border-width:1px; + opacity:80%; +} + + .alarmed-header { background: #ba3e3e; color:#ffffff; border-color: #ba3e3e; border-style: solid; border-width:1px; - opactity:80%; + opacity:80%; } @@ -127,7 +137,7 @@ Credit: https://css-tricks.com/snippets/css/a-guide-to-flexbox/ border-color: #ba3e3e; border-style: solid; border-width:5px; - opactity:80%; + opacity:80%; position:absolute; top:0px; left:0px; diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 8e3915f5..88a0ac38 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -116,7 +116,7 @@ angular.module('zmApp.controllers') zmLog("Saving all parameters to storage"); - zmDebug ("DataModel/setLogin: writing " + JSON.stringify(newLogin)); + //zmDebug ("DataModel/setLogin: writing " + JSON.stringify(newLogin)); //$localstorage.setObject($rootScope.currentServerGroup, loginData); console.log ("Saving For " + loginData.serverName); diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index 563dbcc3..bf107a94 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -39,8 +39,6 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc }; - - $scope.footerCollapse = function() { @@ -49,7 +47,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc }; - + function footerCollapse() { @@ -62,26 +60,30 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc for (var i=0; i< $scope.MontageMonitors.length; i++) { $scope.MontageMonitors[i].eventUrl = "img/noevent.png"; + $scope.MontageMonitors[i].eventUrlTime=""; + // $scope.MontageMonitors[i].connkey= i; } var TimeObjectFrom = moment($scope.datetimeValue.value).format("YYYY-MM-DD HH:mm"); - - - var TimeObjectTo = moment(TimeObjectFrom).add(1,'hour').format('YYYY-MM-DD HH:mm'); - + var apiurl; if ($scope.sliderVal.exactMatch) { - apiurl= ld.apiurl + "/events/index/StartTime =:"+TimeObjectFrom+".json"; + // grab events that start on or before the time and end on or after the time + // this should only bring up events that span that time + apiurl= ld.apiurl + "/events/index/StartTime <=:"+TimeObjectFrom+"/EndTime >=:"+TimeObjectFrom+".json"; } else { + // grab events for next hour and then do expanded search later + // this is so one monitor does not overwhelm as I'm not reading multiple + // pages apiurl= ld.apiurl + "/events/index/StartTime >=:"+TimeObjectFrom+"/StartTime <=:"+ TimeObjectTo+".json"; } ZMDataModel.zmLog ("Event timeline API is " + apiurl); @@ -91,11 +93,12 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc ZMDataModel.zmDebug ("Got new history events:"+ JSON.stringify(data)); - var eid, mid; + var eid, mid, stime; for (i=0; i - - - - + + + + - + - - - + - + - - - - + + + - - - + + + @@ -59,18 +58,23 @@ -
- - - - - +
+ + + + + - +
+ + +
+ + +
- @@ -98,13 +102,14 @@ {{monitor.Monitor.Name}} 
+
+   + {{prettifyDate(monitor.eventUrlTime)}}  +
+
-
- -
@@ -115,12 +120,12 @@
- +
- +
- + + +

Event History

- - + +
+ + + Hide monitors without events + + enable gapless playback + + + exact time match - - Hide monitors without events - - enable gapless playback - - - exact time match - - - - - - - - + + + +
-

+
+
+ +
+
- speed + speed
- - - - - + + +
- - - - + + + + \ No newline at end of file -- cgit v1.2.3