Module: check_mk
Branch: master
Commit: b7d113e19eb97c3460de2ba6a26d68ba5c95496f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b7d113e19eb97c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 13 13:37:30 2017 +0200
Fixed wrong issue with new default deprecated ruleset exclusion
Change-Id: I3f7f1c4160e7cc095fb77ce53e928c5e845c5ab9
---
web/htdocs/wato.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c1511d7..8d61fe3 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -12378,7 +12378,7 @@ class ModeRulesets(WatoMode):
# Explicitly hide deprecated rulesets by default
if not html.has_var("search_p_ruleset_deprecated"):
- html.set_var("search_p_ruleset_deprecated", "1"),
+ html.set_var("search_p_ruleset_deprecated",
DropdownChoice.option_id(False)),
html.set_var("search_p_ruleset_deprecated_USE", "on")
# Transform group argument to the "rule search arguments"
@@ -12553,11 +12553,13 @@ def rule_search_button(search_options=None,
mode="rulesets"):
# Don't highlight the button on "standard page" searches. Meaning the
page calls
# that are no searches from the users point of view because he did not fill the
# search form, but clicked a link in the GUI
- if search_options and (search_options.keys() == ["ruleset_group"]
- or search_options.keys() == ["ruleset_deprecated"]
- or search_options.keys() == ["rule_ineffective"]
- or search_options.keys() == ["ruleset_used"]):
- is_searching = False
+ if is_searching:
+ search_keys = sorted(search_options.keys())
+ if search_keys == ["ruleset_deprecated", "ruleset_group"] \
+ or search_keys == ["ruleset_deprecated"] \
+ or search_keys == ["rule_ineffective"] \
+ or search_keys == ["ruleset_used"]:
+ is_searching = False
if is_searching:
title = _("Refine search")