2016-04-10 20:33:55 +00:00
|
|
|
|
2020-09-02 21:28:08 +00:00
|
|
|
var requestQueue = new Request.Queue({
|
|
|
|
concurrent: monitorData.length,
|
|
|
|
stopOnFailure: false
|
|
|
|
});
|
|
|
|
function streamCmdQuit( ) {
|
2019-01-19 15:32:40 +00:00
|
|
|
if ( action ) {
|
2017-10-04 14:48:37 +00:00
|
|
|
streamCmdReq.send( streamCmdParms+"&command="+CMD_QUIT );
|
2019-01-19 15:32:40 +00:00
|
|
|
}
|
2016-04-10 20:33:55 +00:00
|
|
|
}
|
|
|
|
|
2020-09-25 15:52:13 +00:00
|
|
|
// Manage the Add New Zone button
|
|
|
|
function AddNewZone(el) {
|
|
|
|
url = el.getAttribute('data-url');
|
|
|
|
window.location.assign(url);
|
|
|
|
}
|
|
|
|
|
2020-09-02 21:28:08 +00:00
|
|
|
var monitors = new Array();
|
|
|
|
|
|
|
|
function initPage() {
|
2020-09-04 14:02:43 +00:00
|
|
|
for ( var i = 0, length = monitorData.length; i < length; i++ ) {
|
2020-09-02 21:28:08 +00:00
|
|
|
monitors[i] = new MonitorStream(monitorData[i]);
|
|
|
|
|
|
|
|
// Start the fps and status updates. give a random delay so that we don't assault the server
|
|
|
|
var delay = Math.round( (Math.random()+0.5)*statusRefreshTimeout );
|
|
|
|
monitors[i].start(delay);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener('DOMContentLoaded', initPage);
|
|
|
|
|