Module: check_mk
Branch: master
Commit: ff0ede5d22d1be59df575683d75882e6f4bfbf5f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff0ede5d22d1be…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 17 08:44:03 2014 +0100
FIX Fixed regex matching in BI when using character groups [...]
Regexes were not applied correctly when only using character groups as regex
syntax without any other regex things. The option was not treated correctly
since it was not detected as being a regex.
---
.werks/669 | 11 +++++++++++
ChangeLog | 4 +++-
web/htdocs/bi.py | 6 ++++--
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/.werks/669 b/.werks/669
new file mode 100644
index 0000000..5a39810
--- /dev/null
+++ b/.werks/669
@@ -0,0 +1,11 @@
+Title: Fixed regex matching in BI when using character groups [...]
+Level: 1
+Component: bi
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1392622961
+
+Regexes were not applied correctly when only using character groups as regex
+syntax without any other regex things. The option was not treated correctly
+since it was not detected as being a regex.
diff --git a/ChangeLog b/ChangeLog
index f404483..9e0bdd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -218,7 +218,6 @@
* 0273 FIX: Fixed exceptions when modifying / cloning views...
* 0274 FIX: Fixed exception when view title or description was missing
* 0278 FIX: Fixed bookmark icon images for non-english user languages...
- * 0668 FIX: Allowing upload of files without loading the whole file into memory
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
@@ -285,6 +284,9 @@
* 0058 FIX: Fix email notifications containing non-ASCII characters in some
situtations...
* 0133 FIX: Fixed mkeventd notification plugin...
+ BI:
+ * 0669 FIX: Fixed regex matching in BI when using character groups [...]...
+
Reporting & Availability:
* 0018 New option for displaying a legend for the colors used in the timeline...
* 0405 Add CSV export to availability views...
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 8b186f2..563fb51 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -523,7 +523,8 @@ def find_matching_services(aggr_type, what, calllist):
if middle in g_services_by_hostname:
entries = [ ((e[0], host_re), e[1]) for e in g_services_by_hostname[middle]
]
host_re = "(.*)"
- elif not honor_site and not '*' in host_re and not '$' in host_re and
not '|' in host_re:
+ elif not honor_site and not '*' in host_re and not '$' in host_re \
+ and not '|' in host_re and not '[' in host_re:
# Exact host match
entries = [ ((e[0], host_re), e[1]) for e in g_services_by_hostname.get(host_re,
[]) ]
@@ -887,7 +888,8 @@ def match_host_tags(have_tags, required_tags):
def compile_leaf_node(host_re, service_re = config.HOST_STATE):
found = []
honor_site = SITE_SEP in host_re
- if not honor_site and not '*' in host_re and not '$' in host_re and
not '|' in host_re:
+ if not honor_site and not '*' in host_re and not '$' in host_re \
+ and not '|' in host_re and '[' not in host_re:
entries = [ ((e[0], host_re), e[1]) for e in g_services_by_hostname.get(host_re,
[]) ]
else: