Module: check_mk
Branch: master
Commit: 9bf2472494625e795225ac54f6331558d358f68b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9bf2472494625e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 29 12:30:48 2019 +0100
Extract rule condition rendering to dedicated method
Change-Id: I0297a8ba3b6ec9c369a7368212627134b0a59085
---
cmk/gui/wato/pages/rulesets.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/cmk/gui/wato/pages/rulesets.py b/cmk/gui/wato/pages/rulesets.py
index 357c8e4..97ae9b9 100644
--- a/cmk/gui/wato/pages/rulesets.py
+++ b/cmk/gui/wato/pages/rulesets.py
@@ -1421,6 +1421,19 @@ class EditRuleMode(WatoMode):
html.icon(title=None, icon="rule_%s" % img)
html.radiobutton("value", img, self._rule.value == val,
_("Make the outcome of the ruleset
<b>%s</b><br>") % posneg)
+
+ self._show_conditions()
+
+ forms.end()
+
+ html.button("save", _("Save"))
+ html.hidden_fields()
+ self._vs_rule_options().set_focus("options")
+ html.button("_export_rule", _("Export"))
+
+ html.end_form()
+
+ def _show_conditions(self):
# Conditions
forms.header(_("Conditions"))
@@ -1534,15 +1547,6 @@ class EditRuleMode(WatoMode):
html.close_div()
- forms.end()
-
- html.button("save", _("Save"))
- html.hidden_fields()
- self._vs_rule_options().set_focus("options")
- html.button("_export_rule", _("Export"))
-
- html.end_form()
-
def _show_rule_representation(self):
content = "<pre>%s</pre>" %
html.render_text(pprint.pformat(self._rule.to_dict_config()))