Module: check_mk
Branch: master
Commit: a01c7a5dc3a83ec03a91dbaf00c4b2017fcbdc92
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a01c7a5dc3a83e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Jul 13 16:49:49 2012 +0200
Fixed setting of Downtimes/ Ack when using Nagstamon or similar
---
web/htdocs/views.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 0ba799d..64c84fd 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1349,6 +1349,15 @@ def render_view(view, rows, datasource, group_painters, painters,
elif 'C' in display_options: # (*not* display open, if checkboxes are
currently shown)
show_command_form(False, datasource)
+
+ # Also execute commands in cases without command form (needed for Python-
+ # web service e.g. for NagStaMon)
+ elif len(rows) > 0 and config.may("general.act") \
+ and html.do_actions() and html.transaction_valid():
+ try:
+ do_actions(view, datasource["infos"][0], rows, '')
+ except:
+ pass # currently no feed back on webservice
if 'O' in display_options and len(painter_options) > 0 and
config.may("general.painter_options"):
show_painter_options(painter_options)