diff options
author | Simon Rettberg | 2020-04-16 12:32:26 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-05-07 12:39:37 +0200 |
commit | 10ba76b438174aebe0d352a657bea115beb80221 (patch) | |
tree | f0a7912a1cbfcbd89ca89d9280a51b9108688656 /modules-available/statistics/pages | |
parent | [statistics] Add hook for client machine events (diff) | |
download | slx-admin-10ba76b438174aebe0d352a657bea115beb80221.tar.gz slx-admin-10ba76b438174aebe0d352a657bea115beb80221.tar.xz slx-admin-10ba76b438174aebe0d352a657bea115beb80221.zip |
[statistics] Show current user in client list
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r-- | modules-available/statistics/pages/list.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php index e2e7ff09..97133aa2 100644 --- a/modules-available/statistics/pages/list.inc.php +++ b/modules-available/statistics/pages/list.inc.php @@ -46,7 +46,7 @@ class SubPage } } $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.logintime, m.state, m.currentuser, 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); @@ -102,6 +102,9 @@ class SubPage if (!$row['isclient'] && $row['state'] === 'IDLE') { $row['state'] = 'OCCUPIED'; } + if (!$row['isclient']) { + unset($row['currentuser']); + } } $row['state_' . $row['state']] = true; $row['locationname'] = Location::getName($row['locationid']); |