Merge pull request #2879 from pliablepixels/1.34-dev

return frame IDs of snapshot and alarm frames for a specific e…
This commit is contained in:
Isaac Connor 2020-03-09 14:44:41 -04:00 committed by GitHub
commit 5fe1452a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -149,6 +149,10 @@ class EventsController extends AppController {
));
$event['Event']['NextOfMonitor'] = $event_monitor_neighbors['next']['Event']['Id'];
$event['Event']['PrevOfMonitor'] = $event_monitor_neighbors['prev']['Event']['Id'];
$this->loadModel('Frame');
$event['Event']['MaxScoreFrameId'] = $this->Frame->findByEventid($id,'FrameId',array('Score'=>'desc','FrameId'=>'asc'))['Frame']['FrameId'];
$event['Event']['AlarmFrameId'] = $this->Frame->findByEventidAndType($id,'Alarm')['Frame']['FrameId'];
$this->set(array(
'event' => $event,