Module: check_mk
Branch: master
Commit: 5135e7f68b29d11ed0098c39bdc630ac4b9de3db
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5135e7f68b29d1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jun 26 17:23:12 2013 +0200
Rework global downtime settings
---
web/plugins/views/commands.py | 6 +++---
web/plugins/wato/check_mk_configuration.py | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index e9fc174..23e9393 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -420,14 +420,14 @@ def get_child_hosts(site, hosts, recurse):
def paint_downtime_buttons(what):
downtime_duration = config.default_downtime.get("duration", 60)
downtime_comment = config.default_downtime.get("comment", "")
+ html.write(_('Downtime Comment')+": ")
+ html.text_input("_down_comment", downtime_comment, size=60,
submit="")
+ html.write("<hr>")
html.button("_down_from_now", _("From now for"))
html.write(" ")
html.number_input("_down_minutes", downtime_duration, size=4,
submit="_down_from_now")
html.write(" " + _("minutes"))
html.write("<hr>")
- html.write(_('Downtime Comment')+": ")
- html.text_input("_down_comment", downtime_comment, size=60,
submit="")
- html.write("<hr>")
html.button("_down_2h", _("2 hours"))
html.button("_down_today", _("Today"))
html.button("_down_week", _("This week"))
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index ec2fd34..991e110 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -283,22 +283,22 @@ register_configvar(group,
"default_downtime",
Dictionary(
title = _("Default downtime settings"),
- help = _("This setting allows to set a default downtime comment and
duration. "\
+ help = _("This setting allows to set a default downtime comment and the
duration for the button <i>From now for...</i>. "\
"The schedule downtime formular uses these values as default.
"),
+ optional_keys = False,
elements = [
("duration", Integer(
title = _("Duration"),
help = _("The duration in minutes of the default downtime"),
minvalue = 1,
unit = _("minutes"),
- default_value = 120,
+ default_value = 60,
)),
- ("comment", TextAscii(
+ ("comment", TextUnicode(
title = _("Downtime comment"),
help = _("The default comment for a downtime. "\
"You can use the placeholders %(user)s and %(duration)s
"\
"which will replaced when the downtime command is
sent"),
- default_value = _("Downtime of %(duration)s minutes triggered by
%(user)s"),
size = 80
)),
],