Merge branch 'master' of git://github.com/ZoneMinder/zoneminder
refresh with master
This commit is contained in:
commit
571daec8fc
|
@ -2450,7 +2450,7 @@ our @options = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'ZM_RUN_AUDIT',
|
name => 'ZM_RUN_AUDIT',
|
||||||
default => 'yes',
|
default => 'no',
|
||||||
description => 'Run zmaudit to check data consistency',
|
description => 'Run zmaudit to check data consistency',
|
||||||
help => q`
|
help => q`
|
||||||
The zmaudit daemon exists to check that the saved information
|
The zmaudit daemon exists to check that the saved information
|
||||||
|
@ -2679,7 +2679,7 @@ our @options = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'ZM_OPT_CONTROL',
|
name => 'ZM_OPT_CONTROL',
|
||||||
default => 'no',
|
default => 'yes',
|
||||||
description => 'Support controllable (e.g. PTZ) cameras',
|
description => 'Support controllable (e.g. PTZ) cameras',
|
||||||
help => q`
|
help => q`
|
||||||
ZoneMinder includes limited support for controllable cameras. A
|
ZoneMinder includes limited support for controllable cameras. A
|
||||||
|
@ -2892,7 +2892,7 @@ our @options = (
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name => 'ZM_WEB_LIST_THUMBS',
|
name => 'ZM_WEB_LIST_THUMBS',
|
||||||
default => 'no',
|
default => 'yes',
|
||||||
description => 'Display mini-thumbnails of event images in event lists',
|
description => 'Display mini-thumbnails of event images in event lists',
|
||||||
help => q`
|
help => q`
|
||||||
Ordinarily the event lists just display text details of the
|
Ordinarily the event lists just display text details of the
|
||||||
|
|
|
@ -158,29 +158,19 @@ $GLOBALS['defaultUser'] = array(
|
||||||
|
|
||||||
function loadConfig( $defineConsts=true ) {
|
function loadConfig( $defineConsts=true ) {
|
||||||
global $config;
|
global $config;
|
||||||
global $configCats;
|
|
||||||
global $dbConn;
|
global $dbConn;
|
||||||
|
|
||||||
$config = array();
|
$config = array();
|
||||||
$configCat = array();
|
|
||||||
|
|
||||||
$result = $dbConn->query( 'select * from Config order by Id asc' );
|
$result = $dbConn->query('SELECT Name,Value FROM Config');
|
||||||
if ( !$result )
|
if ( !$result )
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
$monitors = array();
|
|
||||||
while( $row = dbFetchNext( $result ) ) {
|
while( $row = dbFetchNext( $result ) ) {
|
||||||
if ( $defineConsts )
|
if ( $defineConsts )
|
||||||
define( $row['Name'], $row['Value'] );
|
define( $row['Name'], $row['Value'] );
|
||||||
$config[$row['Name']] = $row;
|
$config[$row['Name']] = $row;
|
||||||
if ( !($configCat = &$configCats[$row['Category']]) ) {
|
|
||||||
$configCats[$row['Category']] = array();
|
|
||||||
$configCat = &$configCats[$row['Category']];
|
|
||||||
}
|
|
||||||
$configCat[$row['Name']] = $row;
|
|
||||||
}
|
}
|
||||||
//print_r( $config );
|
} # end function loadConfig
|
||||||
//print_r( $configCats );
|
|
||||||
}
|
|
||||||
|
|
||||||
// For Human-readability, use ZM_SERVER_HOST or ZM_SERVER_NAME in zm.conf, and convert it here to a ZM_SERVER_ID
|
// For Human-readability, use ZM_SERVER_HOST or ZM_SERVER_NAME in zm.conf, and convert it here to a ZM_SERVER_ID
|
||||||
if ( ! defined('ZM_SERVER_ID') ) {
|
if ( ! defined('ZM_SERVER_ID') ) {
|
||||||
|
|
|
@ -117,21 +117,12 @@ function getImageSource( monId, time ) {
|
||||||
Event = events[Frame.EventId];
|
Event = events[Frame.EventId];
|
||||||
|
|
||||||
var storage = Storage[Event.StorageId];
|
var storage = Storage[Event.StorageId];
|
||||||
var server = storage.ServerId ? Servers[storage.ServerId] : Servers[serverId];
|
// monitorServerId may be 0, which gives us the default Server entry
|
||||||
if ( server ) {
|
var server = storage.ServerId ? Servers[storage.ServerId] : Servers[monitorServerId[monId]];
|
||||||
return server.url() +
|
return server.PathToIndex() +
|
||||||
//location.protocol + '//' + server.Hostname +
|
'?view=image&eid=' + Frame.EventId + '&fid='+Frame.FrameId +
|
||||||
//'/cgi-bin/zms?mode=jpeg&replay=single&event=' + event_id +
|
"&width=" + monitorCanvasObj[monId].width +
|
||||||
//'&frame='+Frame.FrameId +
|
"&height=" + monitorCanvasObj[monId].height;
|
||||||
'/index.php?view=image&eid=' + Frame.EventId + '&fid='+Frame.FrameId +
|
|
||||||
"&width=" + monitorCanvasObj[monId].width +
|
|
||||||
"&height=" + monitorCanvasObj[monId].height;
|
|
||||||
}
|
|
||||||
console.log("No server found for " + ( storage.ServerId ? storage.ServerId : serverId ));
|
|
||||||
//console.log("No storage found for " + eStorageId[i] );
|
|
||||||
return '/zm/index.php?view=image&eid=' + Frame.EventId + '&fid='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
|
||||||
//return "/cgi-bin/zms?mode=single&replay=single&event=" + Frame.EventId + '&time='+time+ "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
|
||||||
//return "/cgi-bin/zms?mode=jpeg&replay=single&event=" + Frame.EventId + '&frame='+frame_id + "&width=" + monitorCanvasObj[monId].width + "&height=" + monitorCanvasObj[monId].height;
|
|
||||||
} // end found Frame
|
} // end found Frame
|
||||||
return '';
|
return '';
|
||||||
//return "no data";
|
//return "no data";
|
||||||
|
|
|
@ -18,7 +18,7 @@ var speedIndex=<?php echo $speedIndex?>;
|
||||||
// for history, and fps for live, and dynamically determined (in ms)
|
// for history, and fps for live, and dynamically determined (in ms)
|
||||||
|
|
||||||
var currentDisplayInterval=<?php echo $initialDisplayInterval?>;
|
var currentDisplayInterval=<?php echo $initialDisplayInterval?>;
|
||||||
var playSecsperInterval=1; // How many seconds of recorded image we play per refresh determined by speed (replay rate) and display interval; (default=1 if coming from live)
|
var playSecsperInterval=1; // How many seconds of recorded image we play per refresh determined by speed (replay rate) and display interval; (default=1 if coming from live)
|
||||||
var timerInterval; // milliseconds between interrupts
|
var timerInterval; // milliseconds between interrupts
|
||||||
var timerObj; // object to hold timer interval;
|
var timerObj; // object to hold timer interval;
|
||||||
var freeTimeLastIntervals=[]; // Percentage of current interval used in loading most recent image
|
var freeTimeLastIntervals=[]; // Percentage of current interval used in loading most recent image
|
||||||
|
@ -35,7 +35,7 @@ var timeLabelsFractOfRow = 0.9;
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$anyAlarms = false;
|
$anyAlarms = false;
|
||||||
$maxScore=0;
|
$maxScore = 0;
|
||||||
|
|
||||||
if ( !$liveMode ) {
|
if ( !$liveMode ) {
|
||||||
$result = dbQuery($eventsSql);
|
$result = dbQuery($eventsSql);
|
||||||
|
@ -123,12 +123,18 @@ foreach ( Storage::find() as $Storage ) {
|
||||||
echo 'Storage[' . $Storage->Id() . '] = ' . json_encode($Storage). ";\n";
|
echo 'Storage[' . $Storage->Id() . '] = ' . json_encode($Storage). ";\n";
|
||||||
}
|
}
|
||||||
echo "\nvar Servers = [];\n";
|
echo "\nvar Servers = [];\n";
|
||||||
|
// Fall back to get Server paths, etc when no using multi-server mode
|
||||||
|
$Server = new Server();
|
||||||
|
echo 'Servers[0] = new Server(' . json_encode($Server). ");\n";
|
||||||
foreach ( Server::find() as $Server ) {
|
foreach ( Server::find() as $Server ) {
|
||||||
echo 'Servers[' . $Server->Id() . '] = new Server(' . json_encode($Server). ");\n";
|
echo 'Servers[' . $Server->Id() . '] = new Server(' . json_encode($Server). ");\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
var monitorName = [];
|
var monitorName = [];
|
||||||
var monitorLoading = [];
|
var monitorLoading = [];
|
||||||
|
var monitorServerId = [];
|
||||||
var monitorImageObject = [];
|
var monitorImageObject = [];
|
||||||
var monitorImageURL = [];
|
var monitorImageURL = [];
|
||||||
var monitorLoadingStageURL = [];
|
var monitorLoadingStageURL = [];
|
||||||
|
@ -164,6 +170,7 @@ foreach ( $monitors as $m ) {
|
||||||
echo " monitorWidth[" . $m->Id() . "]=" . $m->Width() . ";\n";
|
echo " monitorWidth[" . $m->Id() . "]=" . $m->Width() . ";\n";
|
||||||
echo " monitorHeight[" . $m->Id() . "]=" . $m->Height() . ";\n";
|
echo " monitorHeight[" . $m->Id() . "]=" . $m->Height() . ";\n";
|
||||||
echo " monitorIndex[" . $m->Id() . "]=" . $numMonitors . ";\n";
|
echo " monitorIndex[" . $m->Id() . "]=" . $numMonitors . ";\n";
|
||||||
|
echo " monitorServerId[" . $m->Id() . "]='" .($m->ServerId() ? $m->ServerId() : '0'). "';\n";
|
||||||
echo " monitorName[" . $m->Id() . "]=\"" . $m->Name() . "\";\n";
|
echo " monitorName[" . $m->Id() . "]=\"" . $m->Name() . "\";\n";
|
||||||
echo " monitorLoadStartTimems[" . $m->Id() . "]=0;\n";
|
echo " monitorLoadStartTimems[" . $m->Id() . "]=0;\n";
|
||||||
echo " monitorLoadEndTimems[" . $m->Id() . "]=0;\n";
|
echo " monitorLoadEndTimems[" . $m->Id() . "]=0;\n";
|
||||||
|
|
|
@ -305,6 +305,22 @@ foreach ( array_map('basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
|
$config = array();
|
||||||
|
$configCat = array();
|
||||||
|
$configCats = array();
|
||||||
|
|
||||||
|
$result = $dbConn->query('SELECT * FROM Config ORDER BY Id ASC');
|
||||||
|
if ( !$result )
|
||||||
|
echo mysql_error();
|
||||||
|
while( $row = dbFetchNext($result) ) {
|
||||||
|
$config[$row['Name']] = $row;
|
||||||
|
if ( !($configCat = &$configCats[$row['Category']]) ) {
|
||||||
|
$configCats[$row['Category']] = array();
|
||||||
|
$configCat = &$configCats[$row['Category']];
|
||||||
|
}
|
||||||
|
$configCat[$row['Name']] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
if ( $tab == 'system' ) {
|
if ( $tab == 'system' ) {
|
||||||
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
$configCats[$tab]['ZM_LANG_DEFAULT']['Hint'] = join( '|', getLanguages() );
|
||||||
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join( '|', $skin_options );
|
$configCats[$tab]['ZM_SKIN_DEFAULT']['Hint'] = join( '|', $skin_options );
|
||||||
|
|
Loading…
Reference in New Issue