Module: check_mk
Branch: master
Commit: 8b30bda0e99de8cb475cd21f2f582d2d1bcc36e5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8b30bda0e99de8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 1 13:48:41 2014 +0200
WATO: Hover menu of user online state shows the last seen date/time now
---
.werks/825 | 8 ++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 +++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/825 b/.werks/825
new file mode 100644
index 0000000..6976b2f
--- /dev/null
+++ b/.werks/825
@@ -0,0 +1,8 @@
+Title: WATO: Hover menu of user online state shows the last seen date/time now
+Level: 1
+Component: wato
+Version: 1.2.5i5
+Date: 1404215298
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 39fba89..32a3365 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 0945 FIX: Sidebar snapin "Problem hosts": Now excludes hosts and services
in downtime
WATO:
+ * 0825 WATO: Hover menu of user online state shows the last seen date/time now
* 0990 FIX: Fix HTTP error handling in bulk inventory...
* 1004 FIX: Fix exception when saving rules, caused by empty item
* 0947 FIX: WATO snapshots: fixed missing files on restoring nagvis backup domains
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9acf07f..d8ac8ca 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11267,12 +11267,14 @@ def mode_users(phase):
# Online/Offline
if config.save_user_access_times:
- if user.get('last_seen', 0) >= online_threshold:
+ last_seen = user.get('last_seen', 0)
+ if last_seen >= online_threshold:
title = _('Online')
img_txt = 'on'
else:
title = _('Offline')
img_txt = 'off'
+ title += ' (%s %s)' % (fmt_date(last_seen), fmt_time(last_seen))
table.cell(_("Act."), '<img class=icon title="%s"
src="images/icon_%sline.png" />' % (title, img_txt))
# Connector