Module: check_mk
Branch: master
Commit: 715b37cfce2b46094832f391ffb5a3d55baadac5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=715b37cfce2b46…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 4 13:38:08 2011 +0100
Multisite: Acknowledgment supports all flags now
---
ChangeLog | 2 ++
web/htdocs/views.py | 15 +++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index eaf520a..8d7d71c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
Python objects. This allows to connect with NagStaMon
(requires patch in NagStaMon). Simply add &output_format=json
or &output_format=python to your view URL.
+ * Acknowledgement of problem now has checkboxes for sticky,
+ send notification and persisten comment
WATO:
* Fixed problem appearing at restart on older Python version (RH)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 7555b7d..d37ea2d 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1589,6 +1589,14 @@ def show_host_service_actions(what):
"<input type=submit name=_remove_ack value=\"Remove
Acknowledgement\"></td></tr><tr>"
"<td class=content><div
class=textinputlegend>Comment:</div>")
html.text_input("_ack_comment")
+ html.write("<br>")
+ html.checkbox("_ack_sticky", True)
+ html.write(" sticky ")
+ html.checkbox("_ack_notify", True)
+ html.write(" send notification ")
+ html.checkbox("_ack_persistent", False)
+ html.write(" persistent comment")
+
html.write("</td></tr>\n")
if config.may("action.addcomment"):
@@ -1707,8 +1715,11 @@ def nagios_host_service_action_command(what, dataset):
comment = html.var_utf8("_ack_comment")
if not comment:
raise MKUserError("_ack_comment", "You need to supply a
comment.")
- command = "ACKNOWLEDGE_" + cmdtag + "_PROBLEM;%s;2;1;0;%s" %
\
- (spec, html.req.user) + (";%s" % comment)
+ sticky = html.var("_ack_sticky") and 2 or 0
+ sendnot = html.var("_ack_notify") and 1 or 0
+ perscomm = html.var("_ack_persistent") and 1 or 0
+ command = "ACKNOWLEDGE_" + cmdtag + "_PROBLEM;%s;%d;%d;%d;%s"
% \
+ (spec, sticky, sendnot, perscomm, html.req.user) + (";%s"
% comment)
title = "<b>acknowledge the problems</b> of"
elif html.var("_add_comment") and
config.may("action.addcomment"):