Merge ../ZoneMinder.master into add_export_to_filter
This commit is contained in:
commit
2c0a119186
|
@ -124,7 +124,7 @@ function getImageSource( monId, time ) {
|
||||||
return location.protocol + '//' + server.Hostname +
|
return location.protocol + '//' + server.Hostname +
|
||||||
//'/cgi-bin/zms?mode=jpeg&replay=single&event=' + event_id +
|
//'/cgi-bin/zms?mode=jpeg&replay=single&event=' + event_id +
|
||||||
//'&frame='+Frame.FrameId +
|
//'&frame='+Frame.FrameId +
|
||||||
'/index.php?view=image&eid=' + Frame.EventId + '&fid='+Frame.FrameId +
|
'/zm/index.php?view=image&eid=' + Frame.EventId + '&fid='+Frame.FrameId +
|
||||||
"&width=" + monitorCanvasObj[monId].width +
|
"&width=" + monitorCanvasObj[monId].width +
|
||||||
"&height=" + monitorCanvasObj[monId].height;
|
"&height=" + monitorCanvasObj[monId].height;
|
||||||
} else {
|
} else {
|
||||||
|
@ -132,7 +132,7 @@ function getImageSource( monId, time ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("No storage found for " + eStorageId[i] );
|
//console.log("No storage found for " + eStorageId[i] );
|
||||||
return '/index.php?view=image&eid=' + Frame.EventId + '&fid='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
return '/zm/index.php?view=image&eid=' + Frame.EventId + '&fid='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
||||||
//return "/cgi-bin/zms?mode=single&replay=single&event=" + Frame.EventId + '&time='+time+ "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
//return "/cgi-bin/zms?mode=single&replay=single&event=" + Frame.EventId + '&time='+time+ "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
||||||
return "/cgi-bin/zms?mode=jpeg&replay=single&event=" + Frame.EventId + '&frame='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
return "/cgi-bin/zms?mode=jpeg&replay=single&event=" + Frame.EventId + '&frame='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
||||||
} // end found Frame
|
} // end found Frame
|
||||||
|
|
|
@ -30,10 +30,6 @@ var timeLabelsFractOfRow = 0.9;
|
||||||
|
|
||||||
// Because we might not have time as the criteria, figure out the min/max time when we run the query
|
// Because we might not have time as the criteria, figure out the min/max time when we run the query
|
||||||
|
|
||||||
if ( ! $maxTimeSecs )
|
|
||||||
$maxTimeSecs = time();
|
|
||||||
if ( ! $minTimeSecs )
|
|
||||||
$minTimeSecs = strtotime('2010-01-01 01:01:01');
|
|
||||||
|
|
||||||
// This builds the list of events that are eligible from this range
|
// This builds the list of events that are eligible from this range
|
||||||
|
|
||||||
|
@ -41,16 +37,16 @@ $index = 0;
|
||||||
$anyAlarms = false;
|
$anyAlarms = false;
|
||||||
$maxScore=0;
|
$maxScore=0;
|
||||||
|
|
||||||
if ( ! $liveMode ) {
|
if ( !$liveMode ) {
|
||||||
$result = dbQuery( $eventsSql );
|
$result = dbQuery($eventsSql);
|
||||||
if ( ! $result ) {
|
if ( !$result ) {
|
||||||
Fatal('SQL-ERR');
|
Fatal('SQL-ERR');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$EventsById = array();
|
$EventsById = array();
|
||||||
|
|
||||||
while( $event = $result->fetch( PDO::FETCH_ASSOC ) ) {
|
while( $event = $result->fetch(PDO::FETCH_ASSOC) ) {
|
||||||
$event_id = $event['Id'];
|
$event_id = $event['Id'];
|
||||||
$EventsById[$event_id] = $event;
|
$EventsById[$event_id] = $event;
|
||||||
}
|
}
|
||||||
|
@ -82,8 +78,9 @@ if ( ! $liveMode ) {
|
||||||
$StartTimeSecs = $event['StartTimeSecs'];
|
$StartTimeSecs = $event['StartTimeSecs'];
|
||||||
$EndTimeSecs = $event['EndTimeSecs'];
|
$EndTimeSecs = $event['EndTimeSecs'];
|
||||||
|
|
||||||
if ( $minTimeSecs > $StartTimeSecs ) $minTimeSecs = $StartTimeSecs;
|
# It isn't neccessary to do this for each event. We should be able to just look at the first and last
|
||||||
if ( $maxTimeSecs < $EndTimeSecs ) $maxTimeSecs = $EndTimeSecs;
|
if ( !$minTimeSecs or $minTimeSecs > $StartTimeSecs ) $minTimeSecs = $StartTimeSecs;
|
||||||
|
if ( !$maxTimeSecs or $maxTimeSecs < $EndTimeSecs ) $maxTimeSecs = $EndTimeSecs;
|
||||||
|
|
||||||
$event_json = json_encode($event, JSON_PRETTY_PRINT);
|
$event_json = json_encode($event, JSON_PRETTY_PRINT);
|
||||||
echo " $event_id : $event_json,\n";
|
echo " $event_id : $event_json,\n";
|
||||||
|
|
|
@ -191,6 +191,7 @@ if ( isset($_REQUEST['displayinterval']) )
|
||||||
|
|
||||||
#$eventsSql .= ' GROUP BY E.Id,E.Name,E.StartTime,E.Length,E.Frames,E.MaxScore,E.Cause,E.Notes,E.Archived,E.MonitorId';
|
#$eventsSql .= ' GROUP BY E.Id,E.Name,E.StartTime,E.Length,E.Frames,E.MaxScore,E.Cause,E.Notes,E.Archived,E.MonitorId';
|
||||||
|
|
||||||
|
$minTimeSecs = $maxTimeSecs = 0;
|
||||||
if ( isset($minTime) && isset($maxTime) ) {
|
if ( isset($minTime) && isset($maxTime) ) {
|
||||||
$minTimeSecs = strtotime($minTime);
|
$minTimeSecs = strtotime($minTime);
|
||||||
$maxTimeSecs = strtotime($maxTime);
|
$maxTimeSecs = strtotime($maxTime);
|
||||||
|
|
Loading…
Reference in New Issue