Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas
This commit is contained in:
commit
0533c7a3d7
|
@ -49,7 +49,7 @@ guide you with a quick search.
|
|||
|
||||
add-apt-repository ppa:iconnor/zoneminder-1.32
|
||||
|
||||
If you are on trusty, you may want to add both, as there are some packages for dependencies included in the old ppa.
|
||||
If you are on Trusty or Xenial, you may want to add both, as there are some packages for dependencies included in the old ppa.
|
||||
|
||||
|
||||
Update repo and upgrade.
|
||||
|
@ -138,9 +138,9 @@ Set /etc/zm/zm.conf to root:www-data 740 and www-data access to content
|
|||
|
||||
::
|
||||
|
||||
a2enconf zoneminder
|
||||
a2enmod cgi
|
||||
a2enmod rewrite
|
||||
a2enconf zoneminder
|
||||
|
||||
You may also want to enable to following modules to improve caching performance
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class StorageController extends AppController {
|
|||
* @return void
|
||||
*/
|
||||
public function index() {
|
||||
$this->Storage->recursive = 0;
|
||||
$this->Storage->recursive = -1;
|
||||
|
||||
$options = '';
|
||||
$storage_areas = $this->Storage->find('all',$options);
|
||||
|
|
|
@ -116,8 +116,15 @@ class Monitor extends AppModel {
|
|||
'OutputCodec' => array('h264','mjpeg','mpeg1','mpeg2'),
|
||||
'OutputContainer' => array('auto','mp4','mkv'),
|
||||
'DefaultView' => array('Events','Control'),
|
||||
'Status' => array('Unknown','NotRunning','Running','NoSignal','Signal'),
|
||||
#'Status' => array('Unknown','NotRunning','Running','NoSignal','Signal'),
|
||||
)
|
||||
);
|
||||
|
||||
public $hasOne = array(
|
||||
'Monitor_Status' => array(
|
||||
'className' => 'Monitor_Status',
|
||||
'foreignKey' => 'MonitorId',
|
||||
'joinTable' => 'Monitor_Status',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
/**
|
||||
* Monitor_Status Model
|
||||
*
|
||||
* @property Event $Event
|
||||
* @property Zone $Zone
|
||||
*/
|
||||
class Monitor_Status extends AppModel {
|
||||
|
||||
/**
|
||||
* Use table
|
||||
*
|
||||
* @var mixed False or table name
|
||||
*/
|
||||
public $useTable = 'Monitor_Status';
|
||||
|
||||
/**
|
||||
* Primary key field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $primaryKey = 'MonitorId';
|
||||
|
||||
/**
|
||||
* Display field
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $displayField = 'Status';
|
||||
|
||||
public $recursive = -1;
|
||||
|
||||
/**
|
||||
* Validation rules
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $validate = array(
|
||||
'MonitorId' => array(
|
||||
'numeric' => array(
|
||||
'rule' => array('numeric'),
|
||||
//'message' => 'Your custom message here',
|
||||
//'allowEmpty' => false,
|
||||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
public $actsAs = array(
|
||||
'CakePHP-Enum-Behavior.Enum' => array(
|
||||
'Status' => array('Unknown','NotRunning','Running','NoSignal','Signal'),
|
||||
)
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
}
|
|
@ -189,7 +189,7 @@ class Storage {
|
|||
# This isn't a function like this in php, so we have to add up the space used in each event.
|
||||
if ( ( !array_key_exists('disk_used_space', $this)) or !$this->{'disk_used_space'} ) {
|
||||
if ( $this->{'Type'} == 's3fs' ) {
|
||||
$this->{'disk_used_space'} = $this->disk_event_space();
|
||||
$this->{'disk_used_space'} = $this->event_disk_space();
|
||||
} else {
|
||||
$path = $this->Path();
|
||||
if ( file_exists($path) ) {
|
||||
|
|
|
@ -341,17 +341,17 @@ fieldset > legend {
|
|||
/*
|
||||
* Behavior classes
|
||||
*/
|
||||
.alarm, .errorText, .error {
|
||||
color: #ff3f34;
|
||||
}
|
||||
|
||||
.alert, .warnText, .warning {
|
||||
color: #ffa801;
|
||||
}
|
||||
|
||||
.ok, .infoText {
|
||||
color: #0fb9b1;
|
||||
}
|
||||
.alert, .warnText, .warning, .disabledText {
|
||||
color: #ffa801;
|
||||
}
|
||||
.alarm, .errorText, .error {
|
||||
color: #ff3f34;
|
||||
}
|
||||
|
||||
.fakelink {
|
||||
color: #7f7fb2;
|
||||
|
|
|
@ -251,15 +251,19 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
|||
}
|
||||
}
|
||||
if ( $monitor['Function'] == 'None' )
|
||||
$fclass = 'errorText';
|
||||
$function_class = 'errorText';
|
||||
else
|
||||
$fclass = 'infoText';
|
||||
if ( !$monitor['Enabled'] )
|
||||
$fclass .= ' disabledText';
|
||||
$function_class = 'infoText';
|
||||
|
||||
|
||||
$scale = max(reScale(SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE), SCALE_BASE);
|
||||
$stream_available = canView('Stream') and $monitor['Type']=='WebSite' or ($monitor['CaptureFPS'] && $monitor['Function'] != 'None');
|
||||
$dot_class=$source_class;
|
||||
if ( $fclass != 'infoText' ) $dot_class=$fclass;
|
||||
$dot_class = $source_class;
|
||||
if ( $function_class != 'infoText' ) {
|
||||
$dot_class = $function_class;
|
||||
} else if ( !$monitor['Enabled'] ) {
|
||||
$dot_class .= ' warnText';
|
||||
}
|
||||
|
||||
if ( ZM_WEB_ID_ON_CONSOLE ) {
|
||||
?>
|
||||
|
@ -268,7 +272,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
|||
}
|
||||
?>
|
||||
<td class="colName">
|
||||
<span class="glyphicon glyphicon-dot <?php echo $dot_class ?>" aria-hidden="true"></span><a <?php echo ($stream_available ? 'href="?view=watch&mid='.$monitor['Id'].'">' : '>') . $monitor['Name'] ?></a><br/><div class="small text-nowrap text-muted">
|
||||
<span class="glyphicon glyphicon-dot <?php echo $dot_class ?>" aria-hidden="true"></span><a <?php echo ($stream_available ? 'href="?view=watch&mid='.$monitor['Id'].'">' : '>') . $monitor['Name'] ?></a><br/><div class="small text-nowrap text-muted">
|
||||
<?php echo implode('<br/>',
|
||||
array_map(function($group_id){
|
||||
$Group = Group::find_one(array('Id'=>$group_id));
|
||||
|
@ -281,7 +285,7 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
|||
?>
|
||||
</div></td>
|
||||
<td class="colFunction">
|
||||
<?php echo makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$fclass.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'</span>', canEdit( 'Monitors' ) ) ?><br/>
|
||||
<?php echo makePopupLink( '?view=function&mid='.$monitor['Id'], 'zmFunction', 'function', '<span class="'.$function_class.'">'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', <span class="disabledText">disabled</span>' : '' ) .'</span>', canEdit('Monitors') ) ?><br/>
|
||||
<?php echo translate('Status'.$monitor['Status']) ?><br/>
|
||||
<div class="small text-nowrap text-muted">
|
||||
<?php
|
||||
|
|
|
@ -937,7 +937,15 @@ if ( $monitor->Type() == 'Local' ) {
|
|||
?>
|
||||
</td></tr>
|
||||
<tr><td><?php echo translate('OptionalEncoderParam') ?></td><td><textarea name="newMonitor[EncoderParameters]" rows="4" cols="36"><?php echo validHtmlStr($monitor->EncoderParameters()) ?></textarea></td></tr>
|
||||
<tr><td><?php echo translate('RecordAudio') ?></td><td><input type="checkbox" name="newMonitor[RecordAudio]" value="1"<?php if ( $monitor->RecordAudio() ) { ?> checked="checked"<?php } ?>/></td></tr>
|
||||
<tr><td><?php echo translate('RecordAudio') ?></td><td>
|
||||
<?php if ( $monitor->Type() == 'Ffmpeg' ) { ?>
|
||||
<input type="checkbox" name="newMonitor[RecordAudio]" value="1"<?php if ( $monitor->RecordAudio() ) { ?> checked="checked"<?php } ?>/>
|
||||
<?php } else { ?>
|
||||
Audio recording only available with FFMPEG using H264 Passthrough
|
||||
<input type="hidden" name="newMonitor[RecordAudio]" value="<?php echo $monitor->RecordAudio() ? 1 : 0 ?>"/>
|
||||
<?php } ?>
|
||||
</td></tr>
|
||||
|
||||
<?php
|
||||
break;
|
||||
case 'timestamp' :
|
||||
|
|
Loading…
Reference in New Issue