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' => 'DateTime', '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; for ( $i = 0; $i < count($displayMonitors); $i++ ) { $monitor = &$displayMonitors[$i]; 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') ); ?>
'. $j .''; } ?> '. makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', ''.$source.'', canEdit( 'Monitors' ) ).''; if ( $show_storage_areas ) { ?>
disabled="disabled"/>
' : '>') . $monitor['Id'] ?> ' : '>') . $monitor['Name'] ?> '.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'', canEdit( 'Monitors' ) ) ?>
Name(); ?> Name(); } ?> ' : '') . $monitor[$i.'Events'] . '
' . human_filesize($monitor[$i.'EventDiskSpace']) ?>
disabled="disabled"/>
' : '') . $eventCounts[$i]['totalevents'].'
'.human_filesize($eventCounts[$i]['totaldiskspace']) ?>