Module: check_mk
Branch: master
Commit: 380ac414fc6462e54158047999057bc3a386e130
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=380ac414fc6462…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 20 14:27:03 2017 +0100
4386 FIX Fixed exception when creating links from service views to service group views
When adding a service group column together with a link to the service group list view,
an exception occured while rendering the service group painter.
Change-Id: I52837391f4b371bde9ca81a91385bebb024c8300
---
.werks/4386 | 11 +++++++++++
web/htdocs/views.py | 11 +++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.werks/4386 b/.werks/4386
new file mode 100644
index 0000000..d0f2e73
--- /dev/null
+++ b/.werks/4386
@@ -0,0 +1,11 @@
+Title: Fixed exception when creating links from service views to service group views
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.5.0i1
+Date: 1487597151
+
+When adding a service group column together with a link to the service group list view,
+an exception occured while rendering the service group painter.
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index f2486d8..73f82a9 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2714,8 +2714,15 @@ def url_to_view(row, view_name):
# See get_link_filter_names() comment for details
for src_key, dst_key in visuals.get_link_filter_names(view,
datasource['infos'],
datasource.get('link_filters',
{})):
- url_vars += visuals.get_filter(src_key).variable_settings(row)
- url_vars += visuals.get_filter(dst_key).variable_settings(row)
+ try:
+ url_vars += visuals.get_filter(src_key).variable_settings(row)
+ except KeyError:
+ pass
+
+ try:
+ url_vars += visuals.get_filter(dst_key).variable_settings(row)
+ except KeyError:
+ pass
# Some special handling for the site filter which is meant as optional hint
# Always add the site filter var when some useful information is available