Module: check_mk
Branch: master
Commit: aca03d362b5bf93721cbe155d8677ff4037680aa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aca03d362b5bf9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jun 8 14:55:41 2017 +0200
8656 FIX Button "All Logfiles" in logwatch user interface now works in
distributed mode
The problem was that this button would only show the log files that are on
the same monitoring site as the currently shown log file or host. This problem
only appeared in a distributed environment.
Change-Id: I1a47413d15098458228a28c06cde9f12553f9896
---
.werks/8656 | 13 +++++++++++++
web/htdocs/logwatch.py | 10 +++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.werks/8656 b/.werks/8656
new file mode 100644
index 0000000..c653a30
--- /dev/null
+++ b/.werks/8656
@@ -0,0 +1,13 @@
+Title: Button "All Logfiles" in logwatch user interface now works in
distributed mode
+Level: 2
+Component: multisite
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1496926447
+
+The problem was that this button would only show the log files that are on
+the same monitoring site as the currently shown log file or host. This problem
+only appeared in a distributed environment.
diff --git a/web/htdocs/logwatch.py b/web/htdocs/logwatch.py
index 6139054..f6bf93b 100644
--- a/web/htdocs/logwatch.py
+++ b/web/htdocs/logwatch.py
@@ -70,6 +70,10 @@ def page_show():
show_host_log_list(site, host_name)
+def button_all_logfiles():
+ html.context_button(_("All Logfiles"), html.makeuri([('site',
''), ('host', ''), ('file', '')]))
+
+
# Shows a list of all problematic logfiles grouped by host
def show_log_list():
html.header(_("All Problematic Logfiles"), stylesheets = stylesheets)
@@ -106,7 +110,7 @@ def show_host_log_list(site, host_name):
html.begin_context_buttons()
html.context_button(_("Services"), services_url(site, host_name),
'services')
- html.context_button(_("All Logfiles"), html.makeuri([('site',
''), ('host', ''), ('file', '')]))
+ button_all_logfiles()
html.context_button(_("Analyze host patterns"), analyse_url(site,
host_name), 'analyze')
ack_button(site, host_name)
html.end_context_buttons()
@@ -163,7 +167,7 @@ def show_file(site, host_name, file_name):
html.begin_context_buttons()
html.context_button(_("Services"), services_url(site, host_name),
'services')
html.context_button(_("All Logfiles of Host"),
html.makeuri([('file', '')]))
- html.context_button(_("All Logfiles"), html.makeuri([('host',
''), ('file', '')]))
+ button_all_logfiles()
html.context_button(_("Analyze patterns"), analyse_url(site, host_name,
file_name), 'analyze')
if html.var('_hidecontext', 'no') == 'yes':
@@ -284,7 +288,7 @@ def do_log_ack(site, host_name, file_name):
html.header(_("Acknowledge %s") % ack_msg, stylesheets = stylesheets)
html.begin_context_buttons()
- html.context_button(_("All Logfiles"), html.makeuri([('host',
''), ('file', '')]))
+ button_all_logfiles()
if host_name:
html.context_button(_("All Logfiles of Host"),
html.makeuri([('file', '')]))
if host_name and file_name: