From d07c0d34644fcffaee889bd9ccdaaa03919d17a5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 8 Nov 2019 17:32:46 +0100 Subject: [statistics] Tag clients with overridden config.vars in list view --- modules-available/statistics/pages/list.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules-available/statistics/pages/list.inc.php') diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php index d4f97d6e..d1c9f2e9 100644 --- a/modules-available/statistics/pages/list.inc.php +++ b/modules-available/statistics/pages/list.inc.php @@ -45,10 +45,11 @@ class SubPage $join .= ' LEFT JOIN runmode USING (machineuuid) '; } } - $res = Database::simpleQuery('SELECT machineuuid, locationid, macaddr, clientip, lastseen,' - . ' logintime, state, realcores, mbram, kvmstate, cpumodel, id44mb, hostname, notes IS NOT NULL AS hasnotes,' - . ' badsectors ' . $xtra . ' FROM machine' - . " $join WHERE $where $sort", $args); + $res = Database::simpleQuery("SELECT m.machineuuid, m.locationid, m.macaddr, m.clientip, m.lastseen, + m.logintime, m.state, m.realcores, m.mbram, m.kvmstate, m.cpumodel, m.id44mb, m.hostname, m.notes IS NOT NULL AS hasnotes, + m.badsectors, Count(s.machineuuid) AS confvars $xtra FROM machine m + LEFT JOIN setting_machine s USING (machineuuid) + $join WHERE $where GROUP BY m.machineuuid $sort", $args); $rows = array(); $singleMachine = 'none'; // TODO: Cannot disable checkbox for those where user has no permission, since we got multiple actions now -- cgit v1.2.3-55-g7522