-
+
- + +
- +
- Logger::NOLOG ) { ?> '.translate('Log').'' ) ?> + + +
- Devices + + + + + 1 ) { + $cycleGroup = isset($_COOKIE['zmGroup'])?$_COOKIE['zmGroup']:0; +?> +
-
+ Montage
+
-
+
+
+
+
+
+
+
+
+
+ + + + + + + +
+ +
diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 2b8c86c65..7086b8e65 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -137,4 +137,122 @@ function xhtmlHeaders( $file, $title ) +
+ diff --git a/web/skins/classic/views/console.php b/web/skins/classic/views/console.php index c9fc45b11..567337cbd 100644 --- a/web/skins/classic/views/console.php +++ b/web/skins/classic/views/console.php @@ -70,6 +70,27 @@ $eventCounts = array( ), ); +$displayMonitors = NULL: + +# Also populates displayMonitors +$navbar = getNavBarHTML(); + +foreach( $displayMonitors as $monitor ) + $monitor['zmc'] = zmcStatus( $monitor ); + $monitor['zma'] = zmaStatus( $monitor ); + $monitor['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitor['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" => $monitor['Id'] ) ); + parseFilter( $filter ); + $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j"; + $monitor['eventCounts'][$j]['filter'] = $filter; + } + $sql = "select ".join($counts,", ")." from Events as E where MonitorId = ?"; + $counts = dbFetchOne( $sql, NULL, array($monitor['Id']) ); + if ( $counts ) $monitor = array_merge( $monitor, $counts ); +} noCacheHeaders();