summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/list.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2020-04-16 12:32:26 +0200
committerSimon Rettberg2020-04-16 12:32:26 +0200
commit6726e9076ca659b4be74118cdb2b49ef56aa317c (patch)
treef0a7912a1cbfcbd89ca89d9280a51b9108688656 /modules-available/statistics/pages/list.inc.php
parent[statistics] Add hook for client machine events (diff)
downloadslx-admin-6726e9076ca659b4be74118cdb2b49ef56aa317c.tar.gz
slx-admin-6726e9076ca659b4be74118cdb2b49ef56aa317c.tar.xz
slx-admin-6726e9076ca659b4be74118cdb2b49ef56aa317c.zip
[statistics] Show current user in client list
Diffstat (limited to 'modules-available/statistics/pages/list.inc.php')
-rw-r--r--modules-available/statistics/pages/list.inc.php5
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']);