Module: check_mk
Branch: master
Commit: e3eb949ad2614ef62bc2686bb7e1ac01c0481cb0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e3eb949ad2614e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 12 16:50:25 2017 +0200
5206 FIX Ruleset quick search now excludes deprecated rulesets
Deprecated rulesets are now excluded from the search when performing
a "quick search" for rulesets / rules in WATO when starting the search
from a view that does not show deprecated rulesets.
Change-Id: Id9b2d30367b1d959332f7b84945a7157b72039d2
---
.werks/5206 | 13 +++++++++++++
web/htdocs/wato.py | 5 +++++
2 files changed, 18 insertions(+)
diff --git a/.werks/5206 b/.werks/5206
new file mode 100644
index 0000000..10b79bf
--- /dev/null
+++ b/.werks/5206
@@ -0,0 +1,13 @@
+Title: Ruleset quick search now excludes deprecated rulesets
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1505227672
+
+Deprecated rulesets are now excluded from the search when performing
+a "quick search" for rulesets / rules in WATO when starting the search
+from a view that does not show deprecated rulesets.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 41dc4cd..402afe7 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -12369,6 +12369,11 @@ class ModeRulesets(WatoMode):
def _from_vars(self):
self._group_name = html.var("group")
+ # 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_USE", "on")
+
# Transform group argument to the "rule search arguments"
# Keeping this for compatibility reasons for the moment
if self._group_name: