array( 'title' => translate('Events'), 'filter' => array( 'Query' => array( 'terms' => array() ) ), 'totalevents' => 0, 'totaldiskspace' => 0, ), 'Hour'=>array( 'title' => translate('Hour'), 'filter' => array( 'Query' => array( 'terms' => array( array( 'attr' => 'StartDateTime', 'op' => '>=', 'val' => '-1 hour' ), ) ) ), 'totalevents' => 0, 'totaldiskspace' => 0, ), 'Day'=>array( 'title' => translate('Day'), 'filter' => array( 'Query' => array( 'terms' => array( array( 'attr' => 'StartDateTime', 'op' => '>=', 'val' => '-1 day' ), ) ) ), 'totalevents' => 0, 'totaldiskspace' => 0, ), 'Week'=>array( 'title' => translate('Week'), 'filter' => array( 'Query' => array( 'terms' => array( array( 'attr' => 'StartDateTime', 'op' => '>=', 'val' => '-7 day' ), ) ) ), 'totalevents' => 0, 'totaldiskspace' => 0, ), 'Month'=>array( 'title' => translate('Month'), 'filter' => array( 'Query' => array( 'terms' => array( array( 'attr' => 'StartDateTime', 'op' => '>=', 'val' => '-1 month' ), ) ) ), 'totalevents' => 0, 'totaldiskspace' => 0, ), 'Archived'=>array( 'title' => translate('Archived'), 'filter' => array( 'Query' => array( 'terms' => array( array( 'attr' => 'Archived', 'op' => '=', 'val' => '1' ), ) ) ), 'totalevents' => 0, 'totaldiskspace' => 0, ), ); $navbar = getNavBarHTML(); ob_start(); include('_monitor_filters.php'); $filterbar = ob_get_contents(); ob_end_clean(); $show_storage_areas = (count($storage_areas) > 1) and (canEdit('System') ? 1 : 0); $maxWidth = 0; $maxHeight = 0; $zoneCount = 0; $total_capturing_bandwidth=0; $status_counts = array(); for ( $i = 0; $i < count($displayMonitors); $i++ ) { $monitor = &$displayMonitors[$i]; if ( !$monitor['Status'] ) { if ( $monitor['Type'] == 'WebSite' ) $monitor['Status'] = 'Running'; else $monitor['Status'] = 'NotRunning'; } if ( !isset($status_counts[$monitor['Status']]) ) $status_counts[$monitor['Status']] = 0; $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); if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth; if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight; } #$monitor['zmc'] = zmcStatus( $monitor ); #$monitor['zma'] = zmaStatus( $monitor ); $zoneCount += $monitor['ZoneCount']; $counts = array(); 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']) ); 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']; $eventCounts[$j]['totaldiskspace'] += $monitor[$j.'EventDiskSpace']; } unset($monitor); } // end foreach display monitor $cycleWidth = $maxWidth; $cycleHeight = $maxHeight; noCacheHeaders(); $eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW); $left_columns = 3; 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')); getBodyTopHTML(); ?>
'.round(100*($status_counts[$status]/count($displayMonitors)),1).'%'; } echo $html; ?>
 keyboard_arrow_
'. $eventCounts[$j]['title'] .''; } ?> '; echo $table_head; } # monitor_i % 100 ?> Height() / $Monitor->Width(); $options['width'] = ZM_WEB_LIST_THUMB_WIDTH; $options['height'] = ZM_WEB_LIST_THUMB_HEIGHT ? ZM_WEB_LIST_THUMB_HEIGHT : ZM_WEB_LIST_THUMB_WIDTH*$ratio_factor; $options['scale'] = intval(ZM_WEB_LIST_THUMB_WIDTH / $Monitor->Width()); $options['mode'] = 'single'; $stillSrc = $Monitor->getStreamSrc($options); $streamSrc = $Monitor->getStreamSrc(array('scale'=>$scale)); $thmbWidth = ( $options['width'] ) ? 'width:'.$options['width'].'px;' : ''; $thmbHeight = ( $options['height'] ) ? 'height:'.$options['height'].'px;' : ''; $imgHTML = '
' : '>'; $imgHTML .= '
'; } ?> '. makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', ''.validHtmlStr($Monitor->Source()).'', canEdit('Monitors') ).''; if ( $show_storage_areas ) { ?> 'and', 'attr'=>'MonitorId', 'op'=>'IN', 'val'=>implode(',',array_map(function($m){return $m['Id'];}, $displayMonitors)) ) ); parseFilter($filter); ?>
videocam  settings 
' : '>') . $monitor['Id'] ?> lens ' : '>') . validHtmlStr($monitor['Name']) ?>
', array_map(function($group_id){ $Group = ZM\Group::find_one(array('Id'=>$group_id)); if ( $Group ) { $Groups = $Group->Parents(); array_push( $Groups, $Group ); } return implode(' > ', array_map(function($Group){ return ''.validHtmlStr($Group->Name()).''; }, $Groups )); }, $Monitor->GroupIds() ) ); ?>
'.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'', canEdit('Monitors') ) ?>

Name()); ?> Name()) : ($monitor['StorageId']?'Deleted '.$monitor['StorageId'].'' : '') ?> ' : '') . $monitor[$i.'Events'] . '
' . human_filesize($monitor[$i.'EventDiskSpace']) ?>
disabled="disabled"/> swap_vert
' : '') . $eventCounts[$i]['totalevents'].'
'.human_filesize($eventCounts[$i]['totaldiskspace']) ?>