Module: check_mk
Branch: master
Commit: f26ba18bf3d7181d0a8d179a50df2f2301e76c68
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f26ba18bf3d718…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Feb 6 21:31:19 2016 +0100
#3166 FIX Fixed problem where scheduled report did not honor host or service group filter
---
.bugs/856 | 6 ++++--
.werks/3166 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/views.py | 8 ++++----
4 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/.bugs/856 b/.bugs/856
index b9eb931..b4181d1 100644
--- a/.bugs/856
+++ b/.bugs/856
@@ -1,11 +1,13 @@
Title: Report scheduler doesn't pass "Group of Host" filter to the report
Component: core
-State: open
+Class: bug
+State: done
Date: 2015-12-15 16:20:50
Targetversion: 1.2.8
-Class: bug
If you create a Report with context "Hostgroup", add a View with Service
errors, this will work but not when the report is used in the scheduler. If
the scheduler is used, the report shows all systems regradless of the given
hostgroup.
+
+2016-02-06 21:30:50: changed state open -> done
diff --git a/.werks/3166 b/.werks/3166
new file mode 100644
index 0000000..f3d11c0
--- /dev/null
+++ b/.werks/3166
@@ -0,0 +1,9 @@
+Title: Fixed problem where scheduled report did not honor host or service group filter
+Level: 1
+Component: reporting
+Compatible: compat
+Version: 1.2.7i4
+Date: 1454790655
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 9424539..a8191dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -362,6 +362,7 @@
Reporting & Availability:
* 2823 FIX: Availability: Fixed division by zero error on rendering the availability
table
+ * 3166 FIX: Fixed problem where scheduled report did not honor host or service group
filter
Event Console:
* 2733 Visibility of Event Console events more flexible now...
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index d1db483..958a38b 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -954,10 +954,10 @@ def show_view(view, show_heading = False, show_buttons = True,
# FIXME TODO HACK to make grouping single contextes possible on host/service infos
# Is hopefully cleaned up soon.
if view['datasource'] in ['hosts', 'services']:
- if 'hostgroup' in view['single_infos']:
- html.set_var('opthost_group', html.var('hostgroup'))
- if 'servicegroup' in view['single_infos']:
- html.set_var('optservice_group', html.var('servicegroup'))
+ if html.has_var('hostgroup') and not
html.has_var("opthost_group"):
+ html.set_var("opthost_group", html.var("hostgroup"))
+ if html.has_var('servicegroup') and not
html.has_var("optservice_group"):
+ html.set_var("optservice_group",
html.var("servicegroup"))
# Now populate the HTML vars with context vars from the view definition. Hard
# coded default values are treated differently: