Module: check_mk
Branch: master
Commit: 6cfb92c0c9583ed5d893562ad1d9fc8bf4edf340
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6cfb92c0c9583e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 2 08:42:44 2015 +0100
#2719 FIX Events Check: Links to EC were broken when using regular expressions as
application
When using a regular expression to find Event Console events for an "Events"
service, the
icon linking from the service to the Event Console linked to a view which did not show
the corrent amount of events.
---
.werks/2719 | 12 ++++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/icons/mkeventd.py | 13 ++++++++-----
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/.werks/2719 b/.werks/2719
new file mode 100644
index 0000000..20ee254
--- /dev/null
+++ b/.werks/2719
@@ -0,0 +1,12 @@
+Title: Events Check: Links to EC were broken when using regular expressions as
application
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1446450077
+
+When using a regular expression to find Event Console events for an "Events"
service, the
+icon linking from the service to the Event Console linked to a view which did not show
+the corrent amount of events.
diff --git a/ChangeLog b/ChangeLog
index 5389ea8..f9e481b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,7 @@
Event Console:
* 2733 Visibility of Event Console events more flexible now...
+ * 2719 FIX: Events Check: Links to EC were broken when using regular expressions as
application...
HW/SW-Inventory:
* 2436 NetApp monitoring: Now able to gather data for inventory...
diff --git a/mkeventd/web/plugins/icons/mkeventd.py
b/mkeventd/web/plugins/icons/mkeventd.py
index f25eac3..34005f3 100644
--- a/mkeventd/web/plugins/icons/mkeventd.py
+++ b/mkeventd/web/plugins/icons/mkeventd.py
@@ -78,17 +78,20 @@ def paint_mkeventd(what, row, tags, custom_vars):
if getattr(config, 'mkeventd_distributed', False):
url_prefix = site['url_prefix'] + 'check_mk/'
- title = _('Events of Host %s') % (row["host_name"])
- url = 'view.py?' + html.urlencode_vars([
+ url_vars = [
("view_name", "ec_events_of_monhost"),
("site", row["site"]),
("host", row["host_name"]),
- ])
+ ]
+
+ title = _('Events of Host %s') % (row["host_name"])
if len(args) >= 2:
- app = args[1].strip('\'')
+ app = args[1].strip('\'').replace("\\\\",
"\\")
title = _('Events of Application "%s" on Host %s') % (app,
host)
- url += '&event_application=' + app
+ url_vars.append(("event_application", app))
+
+ url = 'view.py?' + html.urlencode_vars(url_vars)
return 'mkeventd', title, url_prefix + url