diff --git a/web/skins/xml/views/console.php b/web/skins/xml/views/console.php index ceeb0888a..5e3d19419 100644 --- a/web/skins/xml/views/console.php +++ b/web/skins/xml/views/console.php @@ -194,7 +194,7 @@ foreach( $displayMonitors as $monitor ) $offset = 0; if (isset($_GET['numEvents'])) { $numEvents = $_GET['numEvents']; - $eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,E.Name,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where 1 and ( E.MonitorId = ".$monitor['Id']." ) order by E.StartTime desc"; + $eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,E.Name,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,F.FrameId as MaxFrameId from Monitors as M inner join Events as E on (M.Id = E.MonitorId) and ( E.MonitorId = ".$monitor['Id']." ) inner join Frames as F on (E.Id = F.EventId) and (E.MaxScore = F.Score) and (F.Type = \"Alarm\") group by (E.Id) order by E.StartTime desc"; $eventsSql .= " limit ".$numEvents; /* If there is an pageOff tag for this monitor, then retrieve the offset. Otherwise, don't specify offset */ if (isset($_GET['pageOff'.$monitor['Id']])) { @@ -222,6 +222,11 @@ foreach( $displayMonitors as $monitor ) xml_tag_val("DURATION", $event['Length']); xml_tag_val("FRAMES", $event['Frames']); xml_tag_val("FPS", ($event['Length'] > 0)?ceil($event['Frames']/$event['Length']):0); + xml_tag_val("ALARMFRAMES", $event['AlarmFrames']); + xml_tag_val("TOTSCORE", $event['TotScore']); + xml_tag_val("AVGSCORE", $event['AvgScore']); + xml_tag_val("MAXSCORE", $event['MaxScore']); + xml_tag_val("MAXFRAMEID", $event['MaxFrameId']); xml_tag_sec("EVENT",0); } }