summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/DataModel.js12
-rw-r--r--www/js/EventModalCtrl.js4
-rw-r--r--www/js/MonitorCtrl.js4
-rw-r--r--www/js/MonitorModalCtrl.js1
-rw-r--r--www/js/TimelineCtrl.js14
-rw-r--r--www/templates/monitors-modal.html2
-rw-r--r--www/templates/monitors.html2
7 files changed, 36 insertions, 3 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 72f5e36b..53a79ecd 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -1386,6 +1386,18 @@ angular.module('zmApp.controllers')
return "(Unknown)";
},
+ getMonitorObject: function (id) {
+ var idnum = parseInt(id);
+ for (var i = 0; i < monitors.length; i++) {
+ if (parseInt(monitors[i].Monitor.Id) == idnum) {
+ // console.log ("Matched, exiting getMonitorname");
+ return monitors[i];
+ }
+
+ }
+ return "(Unknown)";
+ },
+
getImageMode: function (id) {
var idnum = parseInt(id);
for (var i = 0; i < monitors.length; i++) {
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index 88c0c2ed..77d033a9 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -133,6 +133,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
function sendCommand(cmd,connkey,extras,rq)
{
+ console.log ("Sending CGI command to " + $scope.commandURL);
var d = $q.defer();
var loginData = ZMDataModel.getLogin();
var rqtoken = rq? rq:"stream";
@@ -157,6 +158,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
foo = foo + extras;
//console.log("EXTRAS****SUB RETURNING " + foo);
}
+ console.log ("CGI subcommand="+foo);
return foo;
},
@@ -190,7 +192,9 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
function processEvent(cmd,connkey)
{
+
var loginData = ZMDataModel.getLogin();
+ console.log ("sending process Event command to " + loginData.url);
var myauthtoken = $rootScope.authSession.replace("&auth=","");
//&auth=
var req = $http({
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index 7501ab5a..03f6d082 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -292,6 +292,8 @@ angular.module('zmApp.controllers')
" and Controllable:" + controllable + " with control ID:" + controlid);
+ $scope.monitor = monitor;
+ //console.log (">>>>>>>>>>>> MONITOR CRL " + $scope.monitor.
$scope.monitorId = mid;
$scope.monitorName = ZMDataModel.getMonitorName(mid);
$scope.LoginData = ZMDataModel.getLogin();
@@ -300,7 +302,7 @@ angular.module('zmApp.controllers')
ZMDataModel.zmLog("Monitor Orientation is: " + $scope.orientation);
$rootScope.rand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
- $scope.monitor = monitor;
+
$scope.showPTZ = false;
$scope.monitorId = mid;
diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js
index 92fc35e7..c01ef369 100644
--- a/www/js/MonitorModalCtrl.js
+++ b/www/js/MonitorModalCtrl.js
@@ -763,6 +763,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', inWithNew);
$scope.monitorId = mid;
$scope.monitorName = ZMDataModel.getMonitorName(mid);
+ $scope.monitor = ZMDataModel.getMonitorObject(mid);
configurePTZ($scope.monitorId);
}, 200);
}
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js
index 383a447d..ea608890 100644
--- a/www/js/TimelineCtrl.js
+++ b/www/js/TimelineCtrl.js
@@ -177,6 +177,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
// pass this event to ModalCtrl
$scope.currentEvent = event;
+
$scope.event = event;
// in Timeline view, make sure events stick to same monitor
$scope.followSameMonitor = "1";
@@ -620,6 +621,19 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
}
}
}
+
+ myevents[i].Event.MonitorName = ZMDataModel.getMonitorName(myevents[i].Event.MonitorId);
+ // now construct base path
+
+ myevents[i].Event.streamingURL = ZMDataModel.getStreamingURL (myevents[i].Event.MonitorId);
+ myevents[i].Event.baseURL = ZMDataModel.getBaseURL (myevents[i].Event.MonitorId);
+ myevents[i].Event.imageMode = ZMDataModel.getImageMode (myevents[i].Event.MonitorId);
+ // console.log ("***** MULTISERVER STREAMING URL FOR EVENTS " + myevents[i].Event.streamingURL);
+
+ // console.log ("***** MULTISERVER BASE URL FOR EVENTS " + myevents[i].Event.baseURL);
+
+
+
if (idfound) {
diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html
index 6408ce6a..0a2ae8ee 100644
--- a/www/templates/monitors-modal.html
+++ b/www/templates/monitors-modal.html
@@ -17,7 +17,7 @@
<div ng-if="!animationInProgress && !isBackground() && connKey">
- <img id="singlemonitor" style="width:100vw; height:100vh;-webkit-transform:rotate({{orientation}}deg);" image-spinner-loader="lines" image-spinner-src="{{monitor.Monitor.streamingURL}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" on-double-tap="closeModal();" />
+ <img id="singlemonitor" style="width:100vw; height:100vh;" image-spinner-loader="lines" image-spinner-src="{{monitor.Monitor.streamingURL}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" on-double-tap="closeModal();" />
diff --git a/www/templates/monitors.html b/www/templates/monitors.html
index bcc7dba3..a7a5a25f 100644
--- a/www/templates/monitors.html
+++ b/www/templates/monitors.html
@@ -45,7 +45,7 @@
<a class="button button-small icon icon-left icon ion-gear-a"
href="" ng-click="changeConfig(monitor.Monitor.Name, monitor.Monitor.Id,monitor.Monitor.Enabled,monitor.Monitor.Function);">Configuration</a>
<a class="button button-small icon icon-left ion-calendar" href="#/events/{{monitor.Monitor.Id}}">Events</a>
- <a class="button button-small icon icon-left ion-ios-eye" ng-click="openModal(monitor.Monitor.Id, monitor.Monitor.Controllable, monitor.Monitor.ControlId, monitor.Monitor.connKey, monitor.Monitor.Orientation)">Live View</a>
+ <a class="button button-small icon icon-left ion-ios-eye" ng-click="openModal(monitor.Monitor.Id, monitor.Monitor.Controllable, monitor.Monitor.ControlId, monitor.Monitor.connKey, monitor)">Live View</a>
</div>
</div>
</div>