diff --git a/web/skins/classic/views/console.php b/web/skins/classic/views/console.php index 2db165c09..1c5f93c7f 100644 --- a/web/skins/classic/views/console.php +++ b/web/skins/classic/views/console.php @@ -23,49 +23,49 @@ $servers = Server::find_all(); $eventCounts = array( array( - "title" => translate('Events'), - "filter" => array( - "terms" => array( + 'title' => translate('Events'), + 'filter' => array( + 'terms' => array( ) ), ), array( - "title" => translate('Hour'), - "filter" => array( - "terms" => array( - array( "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ), + 'title' => translate('Hour'), + 'filter' => array( + 'terms' => array( + array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-1 hour" ), ) ), ), array( - "title" => translate('Day'), - "filter" => array( - "terms" => array( - array( "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ), + 'title' => translate('Day'), + 'filter' => array( + 'terms' => array( + array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-1 day" ), ) ), ), array( - "title" => translate('Week'), - "filter" => array( - "terms" => array( - array( "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ), + 'title' => translate('Week'), + 'filter' => array( + 'terms' => array( + array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-7 day" ), ) ), ), array( - "title" => translate('Month'), - "filter" => array( - "terms" => array( - array( "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ), + 'title' => translate('Month'), + 'filter' => array( + 'terms' => array( + array( 'attr' => "DateTime", 'op' => ">=", 'val' => "-1 month" ), ) ), ), array( - "title" => translate('Archived'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "1" ), + 'title' => translate('Archived'), + 'filter' => array( + 'terms' => array( + array( 'attr' => "Archived", 'op' => "=", 'val' => "1" ), ) ), ), @@ -110,12 +110,12 @@ for ( $i = 0; $i < count($monitors); $i++ ) { $monitors[$i]['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitors[$i]['Id']) ); $counts = array(); for ( $j = 0; $j < count($eventCounts); $j++ ) { - $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) ); + $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( 'cnj' => 'and', 'attr' => 'MonitorId', 'op' => '=', 'val' => $monitors[$i]['Id'] ) ); parseFilter( $filter ); - $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j"; + $counts[] = 'count(if(1'.$filter['sql'].",1,NULL)) as EventCount$j"; $monitors[$i]['eventCounts'][$j]['filter'] = $filter; } - $sql = "select ".join($counts,", ")." from Events as E where MonitorId = ?"; + $sql = 'select '.join($counts,", ").' from Events as E where MonitorId = ?'; $counts = dbFetchOne( $sql, NULL, array($monitors[$i]['Id']) ); if ( $monitors[$i]['Function'] != 'None' ) { $cycleCount++; @@ -208,14 +208,11 @@ if ( canView( 'Stream' ) && $cycleCount > 1 ) { -