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, ), ); require_once('includes/Group_Monitor.php'); $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; $group_ids_by_monitor_id = array(); foreach ( ZM\Group_Monitor::find(array('MonitorId'=>$selected_monitor_ids)) as $GM ) { if ( !isset($group_ids_by_monitor_id[$GM->MonitorId()]) ) $group_ids_by_monitor_id[$GM->MonitorId()] = array(); $group_ids_by_monitor_id[$GM->MonitorId()][] = $GM->GroupId(); } $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; } $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'] .''; } ?> GroupIds(isset($group_ids_by_monitor_id[$Monitor->Id()]) ? $group_ids_by_monitor_id[$Monitor->Id()] : array()); if ( $monitor_i and ( $monitor_i % 100 == 0 ) ) { echo '
videocam  settings 
'; echo $table_head; } # monitor_i % 100 ?> ' : '>') . $monitor['Id'] ?> ViewHeight() / $Monitor->ViewWidth(); $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(100*ZM_WEB_LIST_THUMB_WIDTH / $Monitor->ViewWidth()); $options['mode'] = 'single'; $stillSrc = $Monitor->getStreamSrc($options); $streamSrc = $Monitor->getStreamSrc(array('scale'=>$options['scale']*5)); $thmbWidth = ( $options['width'] ) ? 'width:'.$options['width'].'px;' : ''; $thmbHeight = ( $options['height'] ) ? 'height:'.$options['height'].'px;' : ''; $imgHTML = '
' : '>'; $imgHTML .= '
'; } ?> 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){ if (canView('Stream')) { return ''.validHtmlStr($Group->Name()).''; } else { return validHtmlStr($Group->Name()); } }, $Groups )); }, $Monitor->GroupIds())); } ?>


Name()); ?> '. makeLink( '?view=monitor&mid='.$monitor['Id'], ''.validHtmlStr($Monitor->Source()).'', canEdit('Monitors') ).''; if ( $show_storage_areas ) { ?> Name()) : ($monitor['StorageId']?'Deleted '.$monitor['StorageId'].'' : '') ?> ' : '') . $monitor[$i.'Events'] . '
' . human_filesize($monitor[$i.'EventDiskSpace']) ?>
disabled="disabled"/> swap_vert 'and', 'attr'=>'MonitorId', 'op'=>'IN', 'val'=>implode(',',array_map(function($m){return $m['Id'];}, $displayMonitors)) ) ); parseFilter($filter); ?> ' : '') . $eventCounts[$i]['totalevents'].'
'.human_filesize($eventCounts[$i]['totaldiskspace']) ?>