Module: check_mk
Branch: master
Commit: e4ded1cb71913fce2d7a684b41530134b3a395aa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e4ded1cb71913f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 6 12:38:09 2015 +0100
#1990 FIX Fix two exceptions in PDF exports of host group views
---
.werks/1990 | 10 ++++++++++
ChangeLog | 3 +++
web/plugins/visuals/filters.py | 12 +++++-------
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/.werks/1990 b/.werks/1990
new file mode 100644
index 0000000..206b940
--- /dev/null
+++ b/.werks/1990
@@ -0,0 +1,10 @@
+Title: Fix two exceptions in PDF exports of host group views
+Level: 2
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1423222676
+
+
diff --git a/ChangeLog b/ChangeLog
index e19afe6..ee0a13a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -222,6 +222,9 @@
BI:
* 1784 FIX: Fix exception in BI Boxes when parents are being used
+ Reporting & Availability:
+ * 1990 FIX: Fix two exceptions in PDF exports of host group views
+
Event Console:
* 1845 Keep record of original source IP address of a syslog message or SNMP trap...
* 1873 SEC: Escaping event text of event console messages correctly in views...
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index 4ec065a..2438b67 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -270,12 +270,10 @@ class FilterGroupSelection(Filter):
def filter(self, infoname):
current_value = self.current_value()
- if not current_value:
- raise MKGeneralException(_("This view needs a host/service group to be
specified. "
- "We are missing the URL variable
<tt>%s</tt>." %
- self.htmlvars[0]))
-
- return "Filter: %s_name = %s\n" % (self.what, lqencode(current_value))
+ if current_value:
+ return "Filter: %s_name = %s\n" % (self.what,
lqencode(current_value))
+ else:
+ return ""
def variable_settings(self, row):
group_name = row[self.what + "_name"]
@@ -296,7 +294,7 @@ class FilterHostgroupVisibility(Filter):
if html.var("hostgroupshowempty"):
return ""
else:
- return "Filter: num_hosts > 0\n"
+ return "Filter: hostgroup_num_hosts > 0\n"
declare_filter(101, FilterText("hostgroupnameregex", _("Hostgroup
(Regex)"), "hostgroup", "hostgroup_name",
"hostgroup_regex", "~~"),
_("Search field allowing regular expressions and
partial matches on the names of hostgroups"))