Module: check_mk
Branch: master
Commit: 279934a4f43dbe57bfcfbe726ced063c3f939f5f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=279934a4f43dbe…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Sep 10 12:07:36 2013 +0200
Fixed further POST/GET problems in rule editor and hosttag editor
---
web/htdocs/wato.py | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4fa9eb2..cf25d97 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9259,17 +9259,17 @@ def mode_hosttags(phase):
topic, title = parse_hosttag_title(title)
table.row()
edit_url = make_link([("mode", "edit_hosttag"),
("edit", tag_id)])
- delete_url = html.makeactionuri([("_delete", tag_id)])
+ delete_url = make_action_link([("mode",
"hosttags"), ("_delete", tag_id)])
table.cell(_("Actions"), css="buttons")
if nr == 0:
html.empty_icon_button()
else:
- html.icon_button(html.makeactionuri([("_move",
str(-nr))]),
+ html.icon_button(make_action_link([("mode",
"hosttags"), ("_move", str(-nr))]),
_("Move this tag group one position up"),
"up")
if nr == len(hosttags) - 1:
html.empty_icon_button()
else:
- html.icon_button(html.makeactionuri([("_move", str(nr))]),
+ html.icon_button(make_action_link([("mode",
"hosttags"), ("_move", str(nr))]),
_("Move this tag group one position down"),
"down")
html.icon_button(edit_url, _("Edit this tag group"),
"edit")
html.icon_button(delete_url, _("Delete this tag group"),
"delete")
@@ -9298,7 +9298,7 @@ def mode_hosttags(phase):
table.row()
topic, title = parse_hosttag_title(title)
edit_url = make_link([("mode", "edit_auxtag"),
("edit", nr)])
- delete_url = html.makeactionuri([("_delaux", nr)])
+ delete_url = make_action_link([("mode",
"hosttags"), ("_delaux", nr)])
table.cell(_("Actions"), css="buttons")
html.icon_button(edit_url, _("Edit this auxiliary tag"),
"edit")
html.icon_button(delete_url, _("Delete this auxiliary tag"),
"delete")
@@ -10696,18 +10696,20 @@ def create_rule(rulespec, hostname=None, item=NO_ITEM):
new_rule.append([""])
return tuple(new_rule)
-
-
def rule_button(action, help=None, folder=None, rulenr=0):
if action == None:
html.empty_icon_button()
else:
- vars = [("_folder", folder[".path"]),
- ("_rulenr", str(rulenr)),
- ("_action", action)]
+ vars = [
+ ("mode", html.var('mode', 'edit_ruleset')),
+ ("varname", html.var('varname')),
+ ("_folder", folder[".path"]),
+ ("_rulenr", str(rulenr)),
+ ("_action", action)
+ ]
if html.var("host"):
vars.append(("host", html.var("host")))
- url = html.makeactionuri(vars)
+ url = make_action_link(vars)
html.icon_button(url, help, action)
def parse_rule(ruleset, orig_rule):