Module: check_mk
Branch: master
Commit: 2d243b39b71fa3f76ffb48532ffbe4e0766dcfc6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d243b39b71fa3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 4 15:27:03 2011 +0100
Multisite: specifiy downtime by duration
Only usable via webservice
---
web/htdocs/views.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index c9f48fb..84ea6f3 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1786,6 +1786,12 @@ def nagios_host_service_action_command(what, dataset):
time.asctime(time.localtime(down_from)),
time.asctime(time.localtime(down_to)))
+ # handle hidden field (added for NagStaMon)
+ elif html.var("_down_duration") and
config.may("action.downtimes"):
+ duration = int(html.var("_down_duration"))
+ down_to = down_from + duration
+ title = "<b>schedule a downtime from now lasting for %d
seconds</b> on " % duration
+
elif html.var("_down_remove") and
config.may("action.downtimes"):
downtime_ids = []
for id in dataset[prefix + "downtimes"]: