Merge branch 'add_export_to_filter' into storageareas

pull/2356/head
Isaac Connor 2018-09-25 16:11:19 -04:00
commit 438b582d35
5 changed files with 63 additions and 32 deletions

View File

@ -72,7 +72,7 @@ New installs
6. Configure the web server
This package uses the HTTPS protocol by default to access the web portal,
using rhe default self signed certificate on your system. Requests using
using the default self signed certificate on your system. Requests using
HTTP will auto-redirect to HTTPS.
Inspect the web server configuration file and verify it meets your needs:
@ -129,7 +129,7 @@ New installs
Upgrades
========
1. Conf.d folder support has been added to ZoneMinder 1.31.0. Any custom
1. Conf.d folder support has been added to ZoneMinder. Any custom
changes previously made to zm.conf must now be made in one or more custom
config files, created under the conf.d folder. Do this now. See
/etc/zm/conf.d/README for details. Once you recreate any custom config changes
@ -151,6 +151,10 @@ Upgrades
exists, inspect it and merge anything new in that file with zoneminder.conf.
Verify the SSL REquirements meet your needs. Read README.https if necessary.
The contents of this file must be merged into your Apache configuration.
See step 6 of the installation section if you have not already done this
during a previous upgrade.
4. Upgrade the database before starting ZoneMinder.
Most upgrades can be performed by executing the following command:

View File

@ -72,7 +72,7 @@ New installs
6. Configure the web server
This package uses the HTTPS protocol by default to access the web portal,
using rhe default self signed certificate on your system. Requests using
using the default self signed certificate on your system. Requests using
HTTP will auto-redirect to HTTPS.
Inspect the web server configuration file and verify it meets your needs:
@ -129,7 +129,7 @@ New installs
Upgrades
========
1. Conf.d folder support has been added to ZoneMinder 1.31.0. Any custom
1. Conf.d folder support has been added to ZoneMinder. Any custom
changes previously made to zm.conf must now be made in one or more custom
config files, created under the conf.d folder. Do this now. See
/etc/zm/conf.d/README for details. Once you recreate any custom config changes
@ -147,10 +147,14 @@ Upgrades
3. Verify the ZoneMinder Apache configuration file in the folder
/etc/zm/www. You will have a file called "zoneminder.conf" and there
may also be a file called "zoneminder.conf.rpmnew". If the rpmnew file
may also be a file called "zoneminder.conf.rpmnew". If an rpmnew file
exists, inspect it and merge anything new in that file with zoneminder.conf.
Verify the SSL REquirements meet your needs. Read README.https if necessary.
The contents of this file must be merged into your Apache configuration.
See step 6 of the installation section if you have not already done this
during a previous upgrade.
4. Upgrade the database before starting ZoneMinder.
Most upgrades can be performed by executing the following command:

View File

@ -25,7 +25,6 @@ function exportHeader($title) {
<meta charset="utf-8">
<title><?php echo $title ?></title>
<style type="text/css">
<!--
<?php include(ZM_PATH_WEB.'/'.ZM_SKIN_PATH.'/css/'.ZM_SKIN_NAME.'/export.css'); ?>
ul.tabs {
@ -67,7 +66,6 @@ html ul.tabs li.active, html ul.tabs li.active a:hover {
background: #dddddd;
border-bottom: 1px solid #e0e0e0;
}
-->
</style>
<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>jquery.js"></script>
<!--<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>video.js"></script>-->
@ -94,7 +92,6 @@ html ul.tabs li.active, html ul.tabs li.active a:hover {
});
});
// ]]>
</script>
</head>
<?php
@ -144,8 +141,8 @@ function exportEventFrames($event, $exportDetail, $exportImages) {
exportHeader(translate('Frames').' '.$event->Id());
$otherlinks = '';
if( $exportDetail ) $otherlinks .= '<a href="zmEventDetail.html">'.translate('Event').'</a>,';
if( $exportImages ) $otherlinks .= '<a href="zmEventImages.html">'.translate('Images').'</a>,';
if ( $exportDetail ) $otherlinks .= '<a href="zmEventDetail.html">'.translate('Event').'</a>,';
if ( $exportImages ) $otherlinks .= '<a href="zmEventImages.html">'.translate('Images').'</a>,';
$otherlinks = substr($otherlinks,0,-1);
?>
<body>
@ -265,7 +262,7 @@ function exportEventImages($event, $exportDetail, $exportFrames, $myfilelist) {
</video>
</div><!--videoFeed-->
<?php
} else { // end if DefaultVideo
} else { // end if DefaultVideo
?>
<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgColor=&{slidebgcolor}; visibility=hide>
<layer id="slidenssub" width="&{slidewidth};" left="auto" top="auto"></layer>
@ -587,6 +584,33 @@ else if (document.layers) window.onload=start_slider;
return ob_get_clean();
}
function eventlist_html($Event) {
?>
<div class="event">
<?php
if ( $Event->SaveJPEGs() ) {
?>
<a href="#" onclick="switchevent('<?php echo $Event->Id(); ?>/zmEventImages.html');return false;">
<?php if ( ZM_WEB_LIST_THUMBS ) { ?>
<img width="<?php echo ZM_WEB_LIST_THUMB_WIDTH ?>" src="<?php echo $Event->Id(); ?>/snapshot.jpg" alt="<?php echo $Event->Id()?>"/>
<?php } else { echo $Event->Id(); } ?>
</a>
<?php
} # end if has jpegs
if ( $Event->DefaultVideo() ) {
if ( ZM_WEB_LIST_THUMBS ) {
?>
<a href="<?php echo $Event->Id().'/'.$Event->DefaultVideo() ?>">
<img width="<?php echo ZM_WEB_LIST_THUMB_WIDTH ?>" src="<?php echo $Event->Id(); ?>/snapshot.jpg" alt="<?php echo $Event->Id()?>"/>
</a>
<?php
}
}
?>
</div><!--event-->
<?php
}
function exportEventImagesMaster($eids) {
ob_start();
exportHeader(translate('Images').' Master');
@ -631,25 +655,20 @@ function exportEventImagesMaster($eids) {
<?php
foreach($eids as $eid) {
$Event = new Event($eid);
if ( $Event->SaveJPEGs() ) {
?>
<div><a href="#" onclick="switchevent('<?php echo $eid; ?>/zmEventImages.html');return false;"><?php echo $eid; ?></a></div>
<?php
} # end if saveJPEGs
eventlist_html($Event);
} # end foreach event id
?>
</div>
<?php
foreach ($monitors as $monitor) {
echo "<div class=\"tab_content\" id=\"tab$monitor\">";
echo '<h2>Monitor: ' . $monitorNames[$monitor] . ' </h2>';
foreach ($monitors as $monitor_id) {
echo "<div class=\"tab_content\" id=\"tab$monitor_id\">";
echo '<h2>Monitor: ' . $monitorNames[$monitor_id] . ' </h2>';
foreach ( $eids as $eid ) {
if ( $eventMonitorId[$eid] == $monitor ) {
?>
<div><a href="#" onclick="switchevent('<?php echo $eid; ?>/zmEventImages.html');return false;"><?php echo $eid; ?></a></div>
<?php
}
}
$Event = new Event($eid);
if ( $Event->MonitorId() == $monitor_id ) {
eventlist_html($Event);
} # end if its the right monitor
} # end foreach event
echo '</div>';
} # end foreach monitor
?>
@ -928,7 +947,7 @@ function exportEvents(
} elseif ( $exportFormat == 'zip' ) {
$archive = ZM_DIR_EXPORTS.'/'.$export_root.($connkey?'_'.$connkey:'').'.zip';
$command = 'zip ';
$command = ($exportStructure == 'flat' ? ' -j ' : ' -r ' ).escapeshellarg($archive);
$command .= ($exportStructure == 'flat' ? ' -j ' : ' -r ' ).escapeshellarg($archive);
$command .= $exportCompressed ? ' -9' : ' -0';
} else {
Error("No exportFormat specified.");

View File

@ -125,14 +125,15 @@ $disk_space_total = 0;
</thead>
<tbody>
<?php
$event_count = 0;
while ( $event_row = dbFetchNext($results) ) {
$event = new Event($event_row);
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
echo '<input type="hidden" name="eids[]" value="'.validInt($event->Id())."\"/>\n";
?>
<tr<?php echo $event->Archived() ? ' class="archived"' : '' ?>>
<td class="colId"><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&amp;page=1"> '.$event->Id().($event->Archived()?'*':'') ?></a></td>
<td class="colName"><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&amp;page=1"> '.validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a></td>
<td class="colId"><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery ?>&amp;page=1"><?php echo $event->Id().($event->Archived()?'*':'') ?></a></td>
<td class="colName"><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery ?>&amp;page=1"><?php echo validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a></td>
<td class="colMonitorName"><?php echo makePopupLink( '?view=monitor&amp;mid='.$event->MonitorId(), 'zmMonitor'.$event->Monitorid(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?></td>
<td class="colCause"><?php echo makePopupLink( '?view=eventdetail&amp;eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?></td>
<td class="colTime"><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) .
@ -149,6 +150,7 @@ while ( $event_row = dbFetchNext($results) ) {
<?php
if ( ZM_WEB_EVENT_DISK_SPACE ) {
$disk_space_total += $event->DiskSpace();
$event_count += 1;
?>
<td class="colDiskSpace"><?php echo human_filesize($event->DiskSpace()) ?></td>
<?php
@ -157,6 +159,10 @@ while ( $event_row = dbFetchNext($results) ) {
} # end foreach event
?>
</tbody>
<tfoot>
<td colspan="11"><?php echo $event_count ?> events</td>
<td class="colDiskSpace"><?php echo human_filesize($disk_space_total);?></td>
</tfoot>
</table>
<table id="contentTable" class="minor">

View File

@ -412,7 +412,7 @@ if ( ZM_OPT_MESSAGE ) {
<div id="contentButtons">
<button type="submit" onclick="submitToEvents(this);"><?php echo translate('ListMatches') ?></button>
<button type="button" onclick="submitToExport(this);"><?php echo translate('ExportMatches') ?></button>
<button type="submit" name="executeButton" id="executeButton" onclick="executeFilter( this );"><?php echo translate('Execute') ?></button>
<button type="submit" name="executeButton" id="executeButton" onclick="executeFilter(this);"><?php echo translate('Execute') ?></button>
<?php
if ( canEdit('Events') ) {
?>
@ -421,9 +421,7 @@ if ( canEdit('Events') ) {
<?php
if ( $filter->Id() ) {
?>
<button type="button" value="Delete" onclick="deleteFilter(this, '<?php echo $filter->Name() ?>');">
<?php echo translate('Delete') ?>
</button>
<button type="button" value="Delete" onclick="deleteFilter(this, '<?php echo $filter->Name() ?>');"><?php echo translate('Delete') ?></button>
<?php
}
}