alarmCues to status.php
Switched alarm cues from API to ajax/status.php. Less overhead due to only requesting the information it needs and avoids a weird problem with authentication after sitting logged in for hours.pull/2077/head
parent
617a92e33e
commit
64346a031d
|
@ -137,6 +137,17 @@ $statusData = array(
|
|||
//'Path' => array( 'postFunc' => 'getEventPath' ),
|
||||
),
|
||||
),
|
||||
'frames' => array(
|
||||
'permission' => 'Events',
|
||||
'table' => 'Frames',
|
||||
'selector' => 'EventId',
|
||||
'elements' => array(
|
||||
'EventId' => true,
|
||||
'FrameId' => true,
|
||||
'Type' => true,
|
||||
'Delta' => true,
|
||||
),
|
||||
),
|
||||
'frame' => array(
|
||||
'permission' => 'Events',
|
||||
'table' => 'Frames',
|
||||
|
|
|
@ -45,11 +45,11 @@ $j.ajaxSetup ({timeout: AJAX_TIMEOUT }); //sets timeout for all getJSON.
|
|||
var cueFrames = null; //make cueFrames availaible even if we don't send another ajax query
|
||||
|
||||
function initialAlarmCues (eventId) {
|
||||
$j.getJSON("api/events/"+eventId+".json", setAlarmCues); //get frames data for alarmCues and inserts into html
|
||||
$j.getJSON(thisUrl + '?view=request&request=status&entity=frames&id=' + eventId, setAlarmCues); //get frames data for alarmCues and inserts into html
|
||||
}
|
||||
|
||||
function setAlarmCues (data) {
|
||||
cueFrames = data.event.Frame;
|
||||
cueFrames = data.frames;
|
||||
alarmSpans = renderAlarmCues();
|
||||
$j(".alarmCue").html(alarmSpans);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue