Module: check_mk
Branch: master
Commit: b0401ef5fdb08fc657a39a4d35a1b6d3367f2f12
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0401ef5fdb08f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Sep 3 14:09:46 2015 +0200
This is when using Nagios/Icinga as core.
Conflicts:
ChangeLog
web/plugins/views/commands.py
---
.werks/2580 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/views/commands.py | 7 ++++---
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/2580 b/.werks/2580
new file mode 100644
index 0000000..b747823
--- /dev/null
+++ b/.werks/2580
@@ -0,0 +1,10 @@
+Title: Remove bogus ;0 in comment of problem acknowledgements
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1441281880
+
+This is when using Nagios/Icinga as core.
diff --git a/ChangeLog b/ChangeLog
index 73ab280..700435c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -202,6 +202,7 @@
* 2426 FIX: pnptemplate: fixed template for netapp_api_volumes
* 2578 FIX: Fix exception in case a user has a non-existant role...
* 2556 FIX: Availability: Fixed exception when trying to group BI aggregations by
host/service-groups
+ * 2580 FIX: Remove bogus ;0 in comment of problem acknowledgements...
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index 42b7cdd..88321ea 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -290,13 +290,14 @@ def command_acknowledgement(cmdtag, spec, row):
expire_secs = Age().from_html_vars("_ack_expire")
if expire_secs:
expire = int(time.time()) + expire_secs
+ expire_text = ";%d" % expire
else:
- expire = 0
+ expire_text = ""
def make_command(spec, cmdtag):
return "ACKNOWLEDGE_" + cmdtag +
"_PROBLEM;%s;%d;%d;%d;%s" % \
(spec, sticky, sendnot, perscomm, config.user_id) +
(";%s" % lqencode(comment)) \
- + (";%d" % expire)
+ + expire_text
if "aggr_tree" in row: # BI mode
commands = [(site, make_command(spec, cmdtag)) for (site, spec, cmdtag) in
specs ]
@@ -304,7 +305,7 @@ def command_acknowledgement(cmdtag, spec, row):
commands = [ make_command(spec, cmdtag) ]
title = _("<b>acknowledge the problems%s</b> of") % \
- (expire and (_(" for a period of %s") %
Age().value_to_text(expire_secs)) or "")
+ (expire_text and (_(" for a period of %s") %
Age().value_to_text(expire_secs)) or "")
return commands, title
elif html.var("_remove_ack"):