add needed js stuff for streaming

pull/3034/head
Isaac Connor 2020-09-02 17:28:08 -04:00
parent d243d798ff
commit c2760ef768
1 changed files with 20 additions and 3 deletions

View File

@ -1,9 +1,26 @@
var streamCmdParms = "view=request&request=stream&connkey="+connKey;
var streamCmdReq = new Request.JSON( {url: monitorUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel'} );
function streamCmdQuit( action ) {
var requestQueue = new Request.Queue({
concurrent: monitorData.length,
stopOnFailure: false
});
function streamCmdQuit( ) {
fo
if ( action ) {
streamCmdReq.send( streamCmdParms+"&command="+CMD_QUIT );
}
}
var monitors = new Array();
function initPage() {
for ( var i = 0, length = monitorData.length; i < length; i++ ) {
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);