Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
This commit is contained in:
commit
ccd64b0fae
|
@ -69,7 +69,7 @@ class HostController extends AppController {
|
|||
$this->Session->read('user'); # this is needed for command line/curl to recognize a session
|
||||
$zmAuthRelay = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_RELAY')))['Config']['Value'];
|
||||
if ( $zmAuthRelay == 'hashed' ) {
|
||||
$zmAuthHashIps= $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_HASH_IPS')))['Config']['Value'];
|
||||
$zmAuthHashIps = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_HASH_IPS')))['Config']['Value'];
|
||||
$credentials = 'auth='.generateAuthHash($zmAuthHashIps);
|
||||
} else if ( $zmAuthRelay == 'plain' ) {
|
||||
// user will need to append the store password here
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ var streamMode = "<?php echo $streamMode ?>";
|
|||
var connKey = '<?php echo $connkey ?>';
|
||||
|
||||
var monitorId = <?php echo $monitor->Id() ?>;
|
||||
var monitorUrl = '<?php echo ( $monitor->Server()->Url() ) ?>';
|
||||
var monitorUrl = '<?php echo ( $monitor->Url() ) ?>';
|
||||
|
||||
var streamSrc = "<?php echo preg_replace( '/&/', '&', $streamSrc ) ?>";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var streamCmdParms = "view=request&request=stream&connkey="+connKey;
|
||||
var streamCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel' } );
|
||||
var streamCmdReq = new Request.JSON( { url: monitorUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel' } );
|
||||
|
||||
function streamCmdQuit( action ) {
|
||||
if ( action )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var connKey = '<?php echo $connkey ?>';
|
||||
var monitorUrl = '<?php echo ( $monitor->Server()->Url() ) ?>';
|
||||
var monitorUrl = '<?php echo ( $monitor->Url() ) ?>';
|
||||
var CMD_QUIT = <?php echo CMD_QUIT ?>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue