diff options
author | Simon Rettberg | 2017-11-28 16:41:33 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-11-28 16:41:33 +0100 |
commit | 23d8c6fc0c3b031aa081ee1a245f9b0792514fd3 (patch) | |
tree | 59ce05e8add76d7b63213a0fa447a42565ea2e3d /modules-available/locationinfo/inc/infopanel.inc.php | |
parent | [dnbd3] Disable SLX_SYSTEM_STANDBY_TIMEOUT (diff) | |
download | slx-admin-23d8c6fc0c3b031aa081ee1a245f9b0792514fd3.tar.gz slx-admin-23d8c6fc0c3b031aa081ee1a245f9b0792514fd3.tar.xz slx-admin-23d8c6fc0c3b031aa081ee1a245f9b0792514fd3.zip |
[statistics] Introduce state column to get rid of complicated state determination
This also adds support for the STANDBY state
Diffstat (limited to 'modules-available/locationinfo/inc/infopanel.inc.php')
-rw-r--r-- | modules-available/locationinfo/inc/infopanel.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/locationinfo/inc/infopanel.inc.php b/modules-available/locationinfo/inc/infopanel.inc.php index 66ee0ae7..c612e518 100644 --- a/modules-available/locationinfo/inc/infopanel.inc.php +++ b/modules-available/locationinfo/inc/infopanel.inc.php @@ -81,7 +81,7 @@ class InfoPanel } $positionCol = $withPosition ? 'm.position,' : ''; - $query = "SELECT m.locationid, m.machineuuid, $positionCol m.logintime, m.lastseen, m.lastboot FROM machine m + $query = "SELECT m.locationid, m.machineuuid, $positionCol m.logintime, m.lastseen, m.lastboot, m.state FROM machine m WHERE m.locationid IN (:idlist)"; $dbquery = Database::simpleQuery($query, array('idlist' => $idList)); @@ -107,7 +107,7 @@ class InfoPanel } } $pc['pcState'] = LocationInfo::getPcState($row); - //$pc['pcState'] = ['BROKEN', 'OFF', 'IDLE', 'OCCUPIED'][mt_rand(0,3)]; // XXX + //$pc['pcState'] = ['BROKEN', 'OFFLINE', 'IDLE', 'OCCUPIED', 'STANDBY'][mt_rand(0,4)]; // XXX // Add the array to the machines list. $array[$row['locationid']]['machines'][] = $pc; |