Merge pull request #2852 from connortechnology/Event_list_is_not_filtered_when_Group_is_selected_on_Console
Event list is not filtered when group is selected on console
This commit is contained in:
commit
173d58d8b3
|
@ -707,7 +707,11 @@ Debug(1, "Loading image");
|
|||
|
||||
// when stored as an mp4, we just have the rotation as a flag in the headers
|
||||
// so we need to rotate it before outputting
|
||||
if ( event_data->Orientation != Monitor::ROTATE_0 ) {
|
||||
if (
|
||||
(monitor->GetOptVideoWriter() == Monitor::H264PASSTHROUGH)
|
||||
and
|
||||
(event_data->Orientation != Monitor::ROTATE_0)
|
||||
) {
|
||||
Debug(2, "Rotating image %d", event_data->Orientation);
|
||||
switch ( event_data->Orientation ) {
|
||||
case Monitor::ROTATE_0 :
|
||||
|
|
|
@ -101,7 +101,7 @@ include('_monitor_filters.php');
|
|||
$filterbar = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$show_storage_areas = count($storage_areas) > 1 and canEdit( 'System' ) ? 1 : 0;
|
||||
$show_storage_areas = (count($storage_areas) > 1) and (canEdit('System') ? 1 : 0);
|
||||
$maxWidth = 0;
|
||||
$maxHeight = 0;
|
||||
$zoneCount = 0;
|
||||
|
@ -110,7 +110,7 @@ $total_capturing_bandwidth=0;
|
|||
$status_counts = array();
|
||||
for ( $i = 0; $i < count($displayMonitors); $i++ ) {
|
||||
$monitor = &$displayMonitors[$i];
|
||||
if ( ! $monitor['Status'] ) {
|
||||
if ( !$monitor['Status'] ) {
|
||||
if ( $monitor['Type'] == 'WebSite' )
|
||||
$monitor['Status'] = 'Running';
|
||||
else
|
||||
|
@ -121,8 +121,8 @@ for ( $i = 0; $i < count($displayMonitors); $i++ ) {
|
|||
$status_counts[$monitor['Status']] += 1;
|
||||
|
||||
if ( $monitor['Function'] != 'None' ) {
|
||||
$scaleWidth = reScale( $monitor['Width'], $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
|
||||
$scaleHeight = reScale( $monitor['Height'], $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
|
||||
$scaleWidth = reScale($monitor['Width'], $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
|
||||
$scaleHeight = reScale($monitor['Height'], $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
|
||||
if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth;
|
||||
if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight;
|
||||
}
|
||||
|
@ -131,13 +131,13 @@ for ( $i = 0; $i < count($displayMonitors); $i++ ) {
|
|||
$zoneCount += $monitor['ZoneCount'];
|
||||
|
||||
$counts = array();
|
||||
foreach ( array_keys( $eventCounts ) as $j ) {
|
||||
foreach ( array_keys($eventCounts) as $j ) {
|
||||
$filter = addFilterTerm(
|
||||
$eventCounts[$j]['filter'],
|
||||
count($eventCounts[$j]['filter']['Query']['terms']),
|
||||
array( 'cnj' => 'and', 'attr' => 'MonitorId', 'op' => '=', 'val' => $monitor['Id'] )
|
||||
array('cnj'=>'and', 'attr'=>'MonitorId', 'op'=>'=', 'val'=>$monitor['Id'])
|
||||
);
|
||||
parseFilter( $filter );
|
||||
parseFilter($filter);
|
||||
#$counts[] = 'count(if(1'.$filter['sql'].",1,NULL)) AS EventCount$j, SUM(if(1".$filter['sql'].",DiskSpace,NULL)) As DiskSpace$j";
|
||||
$monitor['eventCounts'][$j]['filter'] = $filter;
|
||||
$eventCounts[$j]['totalevents'] += $monitor[$j.'Events'];
|
||||
|
@ -156,8 +156,7 @@ if ( count($servers) ) $left_columns += 1;
|
|||
if ( ZM_WEB_ID_ON_CONSOLE ) $left_columns += 1;
|
||||
if ( $show_storage_areas ) $left_columns += 1;
|
||||
|
||||
|
||||
xhtmlHeaders( __FILE__, translate('Console') );
|
||||
xhtmlHeaders(__FILE__, translate('Console'));
|
||||
getBodyTopHTML();
|
||||
?>
|
||||
<form name="monitorForm" method="get" action="?">
|
||||
|
@ -364,14 +363,28 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
|
|||
<td class="colStorage"></td>
|
||||
<?php
|
||||
}
|
||||
foreach ( array_keys( $eventCounts ) as $i ) {
|
||||
parseFilter( $eventCounts[$i]['filter'] );
|
||||
foreach ( array_keys($eventCounts) as $i ) {
|
||||
$filter = addFilterTerm(
|
||||
$eventCounts[$i]['filter'],
|
||||
count($eventCounts[$i]['filter']['Query']['terms']),
|
||||
array(
|
||||
'cnj'=>'and',
|
||||
'attr'=>'MonitorId',
|
||||
'op'=>'IN',
|
||||
'val'=>implode(',',array_map(function($m){return $m['Id'];}, $displayMonitors))
|
||||
)
|
||||
);
|
||||
parseFilter($filter);
|
||||
?>
|
||||
<td class="colEvents">
|
||||
<a <?php echo (canView('Events') ? 'href="?view='.ZM_WEB_EVENTS_VIEW.'&page=1'.$eventCounts[$i]['filter']['query'].'">' : '') .
|
||||
$eventCounts[$i]['totalevents'].'<br/></a>'.'<div class="small text-nowrap text-muted">'.human_filesize($eventCounts[$i]['totaldiskspace']) ?></div></td>
|
||||
<a <?php echo
|
||||
(canView('Events') ? 'href="?view='.ZM_WEB_EVENTS_VIEW.'&page=1'.$filter['query'].'">' : '') .
|
||||
$eventCounts[$i]['totalevents'].'</a><br/>
|
||||
<div class="small text-nowrap text-muted">'.human_filesize($eventCounts[$i]['totaldiskspace'])
|
||||
?></div>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
} // end foreach eventCounts
|
||||
?>
|
||||
<td class="colZones"><?php echo $zoneCount ?></td>
|
||||
<?php if ( canEdit('Monitors') ) { ?>
|
||||
|
|
Loading…
Reference in New Issue