summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/list.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2019-11-08 17:32:46 +0100
committerSimon Rettberg2019-11-08 17:32:46 +0100
commitd07c0d34644fcffaee889bd9ccdaaa03919d17a5 (patch)
tree4ad50d58a3aee817f22adb38d1c31ec96357e08b /modules-available/statistics/pages/list.inc.php
parent[statistics] Modularize (diff)
downloadslx-admin-d07c0d34644fcffaee889bd9ccdaaa03919d17a5.tar.gz
slx-admin-d07c0d34644fcffaee889bd9ccdaaa03919d17a5.tar.xz
slx-admin-d07c0d34644fcffaee889bd9ccdaaa03919d17a5.zip
[statistics] Tag clients with overridden config.vars in list view
Diffstat (limited to 'modules-available/statistics/pages/list.inc.php')
-rw-r--r--modules-available/statistics/pages/list.inc.php9
1 files changed, 5 insertions, 4 deletions
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