From 88b17e55dd273ad0ad1099f6c5b26aff2c5b33a1 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 9 Nov 2020 13:43:51 +0100 Subject: [statistics] Honor filters for clients with special mode Closes #3808 --- modules-available/statistics/pages/summary.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules-available/statistics/pages/summary.inc.php b/modules-available/statistics/pages/summary.inc.php index 6fa37c61..ce67070e 100644 --- a/modules-available/statistics/pages/summary.inc.php +++ b/modules-available/statistics/pages/summary.inc.php @@ -84,7 +84,8 @@ class SubPage } $data['json'] = json_encode(array('labels' => $labels, 'datasets' => array($points1, $points2))); if (Module::get('runmode') !== false) { - $res = Database::queryFirst('SELECT Count(*) AS cnt FROM runmode'); + $res = Database::queryFirst('SELECT Count(*) AS cnt FROM machine m INNER JOIN runmode r USING (machineuuid)' + . " $join WHERE $where", $args); $data['runmode'] = $res['cnt']; } // Draw -- cgit v1.2.3-55-g7522