Module: check_mk
Branch: master
Commit: 545e7332fc8f5d267637c2413fbc1db1b91dd334
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=545e7332fc8f5d…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 8 08:51:56 2013 +0100
Displaying date/time of comments in comment icon hover menu (Please
note: You need to update your livestatus to current version to make this work)
---
ChangeLog | 2 ++
web/plugins/icons/builtin.py | 9 +++++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f279f5a..5f48e00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,8 @@
* The ldap member attribute of groups is now configruable via WATO
* Added option to enforce lower User-IDs during LDAP sync
* Improved debug logging of ldap syncs (Now writing duration of queries to log)
+ * Displaying date/time of comments in comment icon hover menu (Please
+ note: You need to update your livestatus to current version to make this work)
BI:
* Use Ajax to delay rendering of invisible parts of the tree (this
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index fffc014..e54d6b9 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -318,17 +318,18 @@ multisite_icons.append({
# +----------------------------------------------------------------------+
def paint_comments(what, row, tags, custom_vars):
- comments = row[what+ "_comments_with_info"]
+ comments = row[what+ "_comments_with_extra_info"]
if len(comments) > 0:
text = ""
- for id, author, comment in comments:
- text += "%s: \"%s\" \n" % (author, comment)
+ for c in comments:
+ id, author, comment, ty, timestamp = c
+ text += "%s %s: \"%s\" \n" % (paint_age(timestamp, True,
0, 'abs')[1], author, comment)
return link_to_view('<img class=icon title=\'%s\' ' \
'src="images/icon_comment.gif">' %
text, row, 'comments_of_' + what)
multisite_icons.append({
- 'columns': [ 'comments_with_info' ],
+ 'columns': [ 'comments_with_extra_info' ],
'paint': paint_comments,
})