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; } $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 ); $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') ); ?>