diff options
author | Simon Rettberg | 2016-07-04 17:08:29 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-07-04 17:08:29 +0200 |
commit | 1a3c9f848bc8b740e15a342486eaf648619e8e22 (patch) | |
tree | b1c5d2d948385c1d83e05af6e97f8c14394153e3 /modules-available/statistics/page.inc.php | |
parent | [news/summernote] Make button selection match capabilities of Qt/vmchooser (diff) | |
download | slx-admin-1a3c9f848bc8b740e15a342486eaf648619e8e22.tar.gz slx-admin-1a3c9f848bc8b740e15a342486eaf648619e8e22.tar.xz slx-admin-1a3c9f848bc8b740e15a342486eaf648619e8e22.zip |
[statistics] Don't show uptime for offline clients; chart.js: highlight in bold
Diffstat (limited to 'modules-available/statistics/page.inc.php')
-rw-r--r-- | modules-available/statistics/page.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index 1e6f7400..de7f965b 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -452,7 +452,10 @@ class Page_Statistics extends Page $client['firstseen_s'] = date('d.m.Y H:i', $client['firstseen']); $client['lastseen_s'] = date('d.m.Y H:i', $client['lastseen']); $uptime = $NOW - $client['lastboot']; - $client['lastboot_s'] = date('d.m.Y H:i', $client['lastboot']) . ' (Up ' . floor($uptime / 86400) . 'd ' . gmdate('H:i', $uptime) . ')'; + $client['lastboot_s'] = date('d.m.Y H:i', $client['lastboot']); + if (!isset($client['state_off']) || !$client['state_off']) { + $client['lastboot_s'] .= ' (Up ' . floor($uptime / 86400) . 'd ' . gmdate('H:i', $uptime) . ')'; + } $client['logintime_s'] = date('d.m.Y H:i', $client['logintime']); $client['gbram'] = round(round($client['mbram'] / 500) / 2, 1); $client['gbtmp'] = round($client['id44mb'] / 1024); |