Module: check_mk
Branch: master
Commit: dcfc2777881ee564c779ff002ede98f87ac5ad30
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dcfc2777881ee5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Aug 14 14:56:22 2015 +0200
#2509 FIX Logwatch: Fixed exception when deleting a specific logfile on multiple hosts
---
.werks/2509 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/logwatch.py | 8 ++++++++
3 files changed, 19 insertions(+)
diff --git a/.werks/2509 b/.werks/2509
new file mode 100644
index 0000000..53c9211
--- /dev/null
+++ b/.werks/2509
@@ -0,0 +1,10 @@
+Title: Logwatch: Fixed exception when deleting a specific logfile on multiple hosts
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1439556957
+
+
diff --git a/ChangeLog b/ChangeLog
index 320d522..a3238a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -141,6 +141,7 @@
* 2468 FIX: Fixed actions for duplicate host names on different sites...
* 2470 FIX: Fixed exception in logwatch log list in rare cases...
* 2375 FIX: prediction preview: automatically select valid prediction period
+ * 2509 FIX: Logwatch: Fixed exception when deleting a specific logfile on multiple
hosts
WATO:
* 2365 Removed old deprecated notification global options for plain emails...
diff --git a/web/htdocs/logwatch.py b/web/htdocs/logwatch.py
index 80af138..fc9588e 100644
--- a/web/htdocs/logwatch.py
+++ b/web/htdocs/logwatch.py
@@ -249,6 +249,14 @@ def do_log_ack(host, filename):
ack_msg = _('the log file %s on host %s') % \
(html.attrencode(filename), html.attrencode(host))
+ else:
+ for this_host, logs in all_logs():
+ file_display = form_file_to_ext(filename)
+ if filename in logs:
+ todo.append((this_host, filename, file_display))
+ ack_msg = _('log file %s on all hosts') % (html.attrencode(filename))
+
+
html.header(_("Acknowledge %s") % ack_msg, stylesheets = stylesheets)
html.begin_context_buttons()