Module: check_mk
Branch: master
Commit: 059307146eff747c2de3724f9a510b48897b5ff6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=059307146eff74…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 15 17:17:02 2016 +0100
GUI cleanup: moved button for deleting a host to header
It is now a context button just like the other buttons, and not anymore a
submit button of the form
---
web/htdocs/wato.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 14bb805..7bd26d1 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1217,9 +1217,13 @@ def mode_edit_host(phase, new, is_cluster):
html.context_button(_("Clustered Services"),
folder_preserving_link([("mode",
"edit_ruleset"), ("varname", "clustered_services")]),
"rulesets")
- if config.may("wato.rename_hosts") and not
Folder.current().locked_hosts():
- html.context_button(_("Rename %s") % (is_cluster and
_("Cluster") or _("Host")),
- folder_preserving_link([("mode", "rename_host"),
("host", hostname)]), "rename_host")
+ if not Folder.current().locked_hosts():
+ if config.may("wato.rename_hosts"):
+ html.context_button(is_cluster and _("Rename Cluster") or
_("Rename Host"),
+ folder_preserving_link([("mode",
"rename_host"), ("host", hostname)]), "rename_host")
+ html.context_button(is_cluster and _("Delete Cluster") or
_("Delete Host"),
+ html.makeactionuri([("delete", "1")]),
"delete")
+
if not is_cluster:
html.context_button(_("Diagnostic"),
folder_preserving_link([("mode", "diag_host"),
("host", hostname)]), "diagnose")
@@ -1308,8 +1312,6 @@ def mode_edit_host(phase, new, is_cluster):
html.image_button("save", _("Save & Finish"),
"submit")
if not is_cluster:
html.image_button("diag_host", _("Save & Test"),
"submit")
- if not new:
- html.image_button("delete", _("Delete host!"),
"submit")
html.hidden_fields()
html.end_form()