Merge branch 'master' into merge_work_on_zms
This commit is contained in:
commit
a679455a0b
|
@ -9,6 +9,7 @@ $raw = isset($_REQUEST['raw']);
|
|||
$data = array();
|
||||
|
||||
if ($raw) {
|
||||
$data['raw'] = array();
|
||||
$sql = 'SELECT S.*,E.*,Z.Name AS ZoneName,Z.Units,Z.Area,M.Name AS MonitorName
|
||||
FROM Stats AS S LEFT JOIN Events AS E ON S.EventId = E.Id LEFT JOIN Zones AS Z ON S.ZoneId = Z.Id LEFT JOIN Monitors AS M ON E.MonitorId = M.Id
|
||||
WHERE S.EventId = ? AND S.FrameId = ? ORDER BY S.ZoneId';
|
||||
|
|
|
@ -18,12 +18,17 @@ class ZM_Object {
|
|||
$row = dbFetchOne("SELECT * FROM `$table` WHERE `Id`=?", NULL, array($IdOrRow));
|
||||
if (!$row) {
|
||||
Error("Unable to load $class record for Id=$IdOrRow");
|
||||
return;
|
||||
}
|
||||
} else if (is_array($IdOrRow)) {
|
||||
$row = $IdOrRow;
|
||||
}
|
||||
|
||||
if ( $row ) {
|
||||
if (!isset($row['Id'])) {
|
||||
Error("No Id in " . print_r($row, true));
|
||||
return;
|
||||
}
|
||||
foreach ($row as $k => $v) {
|
||||
$this->{$k} = $v;
|
||||
}
|
||||
|
|
|
@ -116,7 +116,10 @@ xhtmlHeaders(__FILE__, translate('Frame').' - '.$Event->Id().' - '.$Frame->Frame
|
|||
<p id="image">
|
||||
<?php
|
||||
if ( $imageData['hasAnalImage'] ) {
|
||||
echo sprintf('<a href="?view=frame&eid=%d&fid=%d&scale=%d&show=%s">', $Event->Id(), $Frame->FrameId(), $scale, ( $show=='anal'?'capt':'anal' ) );
|
||||
echo sprintf('<a href="?view=frame&eid=%d&fid=%d&scale=%d&show=%s" title="Click to display frame %s analysis">',
|
||||
$Event->Id(), $Frame->FrameId(), $scale, ( $show=='anal'?'capt':'anal' ),
|
||||
( $show=='anal'?'without':'with' ),
|
||||
);
|
||||
}
|
||||
?>
|
||||
<img id="frameImg"
|
||||
|
|
|
@ -40,8 +40,8 @@ function changeScale() {
|
|||
}
|
||||
|
||||
function getFrameStatsCookie() {
|
||||
var cookie = 'zmFrameStats';
|
||||
var stats = getCookie(cookie);
|
||||
const cookie = 'zmFrameStats';
|
||||
let stats = getCookie(cookie);
|
||||
|
||||
if (!stats) {
|
||||
stats = 'on';
|
||||
|
@ -53,7 +53,7 @@ function getFrameStatsCookie() {
|
|||
function getStat(params) {
|
||||
$j.getJSON(thisUrl + '?view=request&request=stats&raw=true', params)
|
||||
.done(function(data) {
|
||||
var stats = data.raw;
|
||||
const stats = data.raw;
|
||||
|
||||
|
||||
$j('#frameStatsTable').empty().append('<tbody>');
|
||||
|
|
Loading…
Reference in New Issue