diff --git a/docs/installationguide/ubuntu.rst b/docs/installationguide/ubuntu.rst index 3df065264..6c686d7ed 100644 --- a/docs/installationguide/ubuntu.rst +++ b/docs/installationguide/ubuntu.rst @@ -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 diff --git a/web/api/app/Controller/StorageController.php b/web/api/app/Controller/StorageController.php index 325dea4dd..16791788c 100644 --- a/web/api/app/Controller/StorageController.php +++ b/web/api/app/Controller/StorageController.php @@ -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); diff --git a/web/api/app/Model/Monitor.php b/web/api/app/Model/Monitor.php index 5c0f62641..2e6584794 100644 --- a/web/api/app/Model/Monitor.php +++ b/web/api/app/Model/Monitor.php @@ -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', + ) + ); } diff --git a/web/api/app/Model/Monitor_Status.php b/web/api/app/Model/Monitor_Status.php new file mode 100644 index 000000000..40f4aa2c2 --- /dev/null +++ b/web/api/app/Model/Monitor_Status.php @@ -0,0 +1,59 @@ + 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 +} diff --git a/web/includes/Storage.php b/web/includes/Storage.php index 0744889f9..95f1dab84 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -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) ) { diff --git a/web/skins/classic/css/base/skin.css b/web/skins/classic/css/base/skin.css index 3fdd5a12f..f95c0003e 100644 --- a/web/skins/classic/css/base/skin.css +++ b/web/skins/classic/css/base/skin.css @@ -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; diff --git a/web/skins/classic/views/console.php b/web/skins/classic/views/console.php index 46575ffa0..6de978a6c 100644 --- a/web/skins/classic/views/console.php +++ b/web/skins/classic/views/console.php @@ -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 ) { } ?> - ' : '>') . $monitor['Name'] ?>
+ ' : '>') . $monitor['Name'] ?>
', 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 ) { ?>
- '.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'', canEdit( 'Monitors' ) ) ?>
+ '.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'', canEdit('Monitors') ) ?>

Type() == 'Local' ) { ?> - RecordAudio() ) { ?> checked="checked"/> + +Type() == 'Ffmpeg' ) { ?> + RecordAudio() ) { ?> checked="checked"/> + + Audio recording only available with FFMPEG using H264 Passthrough + + + +