Module: check_mk
Branch: master
Commit: f9bb6eb0c3874e14d9c61170d2dba11efdf95a2b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f9bb6eb0c3874e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jun 19 09:48:36 2015 +0200
Allow tilde-prefixed regular expressions for explicit host names again
---
web/htdocs/wato.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a6caa57..a7e6729 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -14833,7 +14833,7 @@ def get_rule_conditions(ruleset):
else:
negate = html.get_checkbox("negate_hosts")
nr = 0
- vs = ListOfStrings(valuespec=Hostname())
+ vs = ListOfStrings()
host_list = vs.from_html_vars("hostlist")
vs.validate_value(host_list, "hostlist")
if negate:
@@ -15046,9 +15046,13 @@ def mode_edit_rule(phase, new = False):
html.checkbox("negate_hosts", negate_hosts, label =
_("<b>Negate:</b> make rule apply for <b>all
but</b> the above hosts"))
html.write("</div>")
- html.help(_("You can enter a number of explicit host names that rule should or
should "
- "not apply to here. Leave this option disabled if you want the rule
to "
- "apply for all hosts specified by the given tags."))
+ html.help(_("Here you can enter a list of explicit host names that the rule
should or should "
+ "not apply to. Leave this option disabled if you want the rule to
"
+ "apply for all hosts specified by the given tags. The names that
you "
+ "enter here are compared with case sensitive exact matching.
Alternatively "
+ "you can use regular expressions if you enter a tilde
(<tt>~</tt>) as the first "
+ "character. That regular expression must match the
<i>beginning</i> of "
+ "the host names in question."))
# Itemlist
itemtype = rulespec["itemtype"]