From 069f67a10f87f4f931fc54858e17018e0c44f039 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 20 Oct 2018 14:32:58 -0400 Subject: [PATCH] Break some long lines --- web/skins/classic/views/js/zone.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/views/js/zone.js b/web/skins/classic/views/js/zone.js index 023671588..6389e3ce9 100644 --- a/web/skins/classic/views/js/zone.js +++ b/web/skins/classic/views/js/zone.js @@ -471,7 +471,13 @@ function setAlarmState( currentAlarmState ) { } var streamCmdParms = "view=request&request=stream&connkey="+connKey; -var streamCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getStreamCmdResponse } ); +var streamCmdReq = new Request.JSON( { + url: monitorUrl, + method: 'get', + timeout: AJAX_TIMEOUT, + link: 'cancel', + onSuccess: getStreamCmdResponse +} ); var streamCmdTimer = null; var streamStatus; @@ -546,7 +552,14 @@ function streamCmdQuery() { } var statusCmdParms = "view=request&request=status&entity=monitor&id="+monitorId+"&element[]=Status&element[]=FrameRate"; -var statusCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', data: statusCmdParms, timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getStatusCmdResponse } ); +var statusCmdReq = new Request.JSON( { + url: monitorUrl, + method: 'get', + data: statusCmdParms, + timeout: AJAX_TIMEOUT, + link: 'cancel', + onSuccess: getStatusCmdResponse +} ); var statusCmdTimer = null; function getStatusCmdResponse( respObj, respText ) { @@ -652,11 +665,13 @@ function initPage() { // Imported from watch.js and modified for new zone edit view // + var delay = (Math.random()+0.1)*statusRefreshTimeout; + //console.log("Delay for status updates is: " + delay ); if ( streamMode == "single" ) { - statusCmdTimer = statusCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout ); + statusCmdTimer = statusCmdQuery.delay( delay ); watchdogCheck.pass('status').periodical(statusRefreshTimeout*2); } else { - streamCmdTimer = streamCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout ); + streamCmdTimer = streamCmdQuery.delay( delay ); watchdogCheck.pass('stream').periodical(statusRefreshTimeout*2); }