diff options
author | Simon Rettberg | 2018-01-12 12:38:05 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-01-12 12:38:05 +0100 |
commit | f29bfb7c32a3a968cd46940612e877aa18528c55 (patch) | |
tree | fd7fa2cf4e293f50f7ec6e4159b1694d53761672 /modules-available/statistics | |
parent | [inc/User] Removed unecessary logging line (diff) | |
download | slx-admin-f29bfb7c32a3a968cd46940612e877aa18528c55.tar.gz slx-admin-f29bfb7c32a3a968cd46940612e877aa18528c55.tar.xz slx-admin-f29bfb7c32a3a968cd46940612e877aa18528c55.zip |
[statistics] Fix display of machine usage history bar
Diffstat (limited to 'modules-available/statistics')
-rw-r--r-- | modules-available/statistics/page.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index 877a90f2..ac103a41 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -947,9 +947,9 @@ class Page_Statistics extends Page // Not seen in last two weeks $spans['graph'] .= '<div style="background:#444;left:0;width:100%"> </div>'; } - if (isset($client['state_occupied'])) { + if ($client['state'] === 'OCCUPIED') { $spans['graph'] .= '<div style="background:#e99;left:' . round(($client['logintime'] - $cutoff) * $scale, 2) . '%;width:' . round(($NOW - $client['logintime'] + 900) * $scale, 2) . '%"> </div>'; - } elseif (isset($client['state_off'])) { + } elseif ($client['state'] === 'OFFLINE') { $spans['graph'] .= '<div style="background:#444;left:' . round(($client['lastseen'] - $cutoff) * $scale, 2) . '%;width:' . round(($NOW - $client['lastseen'] + 900) * $scale, 2) . '%"> </div>'; } $t = explode('-', date('Y-n-j-G', $cutoff)); |