Merge branch 'master' into storageareas

This commit is contained in:
Isaac Connor 2019-06-03 09:47:52 -04:00
commit ecc1c6e272
7 changed files with 29 additions and 23 deletions

View File

@ -21,7 +21,7 @@ Build-Depends: debhelper (>= 9), cmake
, libphp-serialization-perl
, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libdbd-mysql-perl
, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl
, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl
, libmodule-load-perl, libsys-mmap-perl, libjson-maybexs-perl
, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl
, libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl
, libsys-cpu-perl, libsys-meminfo-perl
@ -39,7 +39,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
, libphp-serialization-perl
, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libdbd-mysql-perl
, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl
, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, libjson-maybexs-perl
, libmodule-load-perl, libsys-mmap-perl, libjson-maybexs-perl
, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl
, libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl
, libsys-cpu-perl, libsys-meminfo-perl

View File

@ -52,7 +52,6 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
,libdbd-mysql-perl
,libdevice-serialport-perl
,libimage-info-perl
,libjson-any-perl
,libjson-maybexs-perl
,libsys-mmap-perl [!hurd-any]
,liburi-encode-perl
@ -98,7 +97,7 @@ Description: video camera security and surveillance solution
# ,libdbd-mysql-perl
# ,libdevice-serialport-perl
# ,libimage-info-perl
# ,libjson-any-perl
# ,libjson-maybexs-perl
# ,libsys-mmap-perl [!hurd-any]
# ,liburi-encode-perl
# ,libwww-perl

View File

@ -58,7 +58,6 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
,libdbd-mysql-perl
,libdevice-serialport-perl
,libimage-info-perl
,libjson-any-perl
,libjson-maybexs-perl
,libsys-mmap-perl [!hurd-any]
,liburi-encode-perl
@ -109,7 +108,7 @@ Description: video camera security and surveillance solution
# ,libdbd-mysql-perl
# ,libdevice-serialport-perl
# ,libimage-info-perl
# ,libjson-any-perl
# ,libjson-maybexs-perl
# ,libsys-mmap-perl [!hurd-any]
# ,liburi-encode-perl
# ,libwww-perl

View File

@ -271,7 +271,7 @@ sub checkFilter {
my $filter = shift;
my @Events = $filter->Execute();
Info(
Debug(
join(' ',
'Checking filter', $filter->{Name},
join(', ',

View File

@ -101,7 +101,7 @@ X264MP4Writer::X264MP4Writer(
Error("Failed init swscaleobj");
return;
}
swscaleobj.SetDefaults(zm_pf, codec_pf, width, height);
/* Calculate the image sizes. We will need this for parameter checking */
@ -458,11 +458,12 @@ int X264MP4Writer::x264encodeloop(bool bFlush) {
/* Write the sample */
if ( !buffer.empty() ) {
unsigned int bufSize = buffer.size();
if ( !MP4WriteSample(
mp4h,
mp4vtid,
buffer.extract(buffer.size()),
buffer.size(),
buffer.extract(bufSize),
bufSize,
duration,
offset,
prevKeyframe) ) {

View File

@ -302,7 +302,7 @@ if ( ZM_OPT_X10 && canView('Devices') ) { ?>
// if canview_reports
?>
<?php
if (isset($_REQUEST['filter']['Query']['terms']['attr'])) {
if ( isset($_REQUEST['filter']['Query']['terms']['attr']) ) {
$terms = $_REQUEST['filter']['Query']['terms'];
$count = 0;
foreach ($terms as $term) {
@ -327,10 +327,17 @@ if (isset($_REQUEST['filter']['Query']['terms']['attr'])) {
</ul>
<div class="navbar-right">
<?php if ( ZM_OPT_USE_AUTH and $user ) { ?>
<p class="navbar-text"><i class="material-icons">account_circle</i> <?php echo makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?> </p>
<?php } ?>
<?php if ( canEdit('System') ) { ?>
<?php
if ( ZM_OPT_USE_AUTH and $user ) {
?>
<p class="navbar-text">
<i class="material-icons">account_circle</i>
<?php echo makePopupLink( '?view=logout', 'zmLogout', 'logout', $user['Username'], (ZM_AUTH_TYPE == "builtin") ) ?>
</p>
<?php
}
if ( canEdit('System') ) {
?>
<button type="button" class="btn btn-default navbar-btn" data-toggle="modal" data-target="#modalState"><?php echo $status ?></button>
<?php if ( ZM_SYSTEM_SHUTDOWN ) { ?>
<p class="navbar-text">
@ -349,7 +356,7 @@ if (isset($_REQUEST['filter']['Query']['terms']['attr'])) {
} //end reload null. Runs on full page load
if ( (!ZM_OPT_USE_AUTH) or $user ) {
if ($reload == 'reload') ob_start();
if ($reload == 'reload') ob_start();
?>
<div id="reload" class="container-fluid reduced-text">
<div id="Bandwidth" class="pull-left">
@ -360,7 +367,7 @@ if ($reload == 'reload') ob_start();
</div>
<ul class="list-inline">
<li class="Load"><i class="material-icons md-18">trending_up</i>&nbsp;<?php echo translate('Load') ?>: <?php echo getLoad() ?></li>
<i class="material-icons md-18">storage</i>
<i class="material-icons md-18">storage</i>
<?php
$connections = dbFetchOne( "SHOW status WHERE variable_name='threads_connected'", 'Value' );
$max_connections = dbFetchOne( "SHOW variables WHERE variable_name='max_connections'", 'Value' );
@ -389,9 +396,9 @@ if ($reload == 'reload') ob_start();
return '<span class="'.$class.'" title="'.$title.'">'.$S->Name() . ': ' . $S->disk_usage_percent().'%' . '</span>'; };
#$func = function($S){ return '<span title="">'.$S->Name() . ': ' . $S->disk_usage_percent().'%' . '</span>'; };
if ( count($storage_areas) >= 4 )
if ( count($storage_areas) > 4 )
$storage_areas = ZM\Storage::find( array('ServerId'=>null) );
if ( count($storage_areas) < 4 )
if ( count($storage_areas) <= 4 )
echo implode( ', ', array_map ( $func, $storage_areas ) );
echo ' ' . ZM_PATH_MAP .': '. getDiskPercent(ZM_PATH_MAP).'%';
?></li>
@ -401,7 +408,7 @@ if ($reload == 'reload') ob_start();
<?php } ?>
<!-- End .footer/reload --></div>
<?php
if ($reload == 'reload') return ob_get_clean();
if ($reload == 'reload') return ob_get_clean();
} // end if (!ZM_OPT_USE_AUTH) or $user )
?>
</div>

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
if ( !canEdit( 'System' ) ) {
if ( !canEdit('System') ) {
$view = 'error';
return;
}
@ -55,12 +55,12 @@ foreach ( $servers as $S ) {
}
$focusWindow = true;
xhtmlHeaders(__FILE__, translate('Storage')." - ".$newStorage['Name'] );
xhtmlHeaders(__FILE__, translate('Storage').' - '.$newStorage['Name']);
?>
<body>
<div id="page">
<div id="header">
<h2><?php echo translate('Storage')." - ".$newStorage['Name'] ?></h2>
<h2><?php echo translate('Storage').' - '.$newStorage['Name'] ?></h2>
</div>
<div id="content">
<form name="contentForm" method="post" action="?" class="validateFormOnSubmit">