Module: check_mk
Branch: master
Commit: 7b6497c9a7eb3cacd2f627cc2a86cdc2284a38f8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b6497c9a7eb3c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 7 11:33:51 2011 +0100
Fixed logwatch stylesheets
---
web/htdocs/{page_logwatch.py => logwatch.py} | 9 +++++----
web/plugins/pages/shipped.py | 4 ++--
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/page_logwatch.py b/web/htdocs/logwatch.py
similarity index 97%
rename from web/htdocs/page_logwatch.py
rename to web/htdocs/logwatch.py
index d19db15..45e8d5a 100644
--- a/web/htdocs/page_logwatch.py
+++ b/web/htdocs/logwatch.py
@@ -28,6 +28,7 @@ import htmllib, livestatus, time, re, os, datetime, config, defaults
from lib import *
import views
+stylesheets = [ 'pages', 'status', 'logwatch' ]
def page():
host = html.var('host')
@@ -51,7 +52,7 @@ def page():
# Shows a list of all problematic logfiles grouped by host
def show_log_list():
- html.header(_("All problematic Logfiles"))
+ html.header(_("All problematic Logfiles"), stylesheets = stylesheets)
html.write("<table class=data>\n")
for host, logs in all_logs():
@@ -63,7 +64,7 @@ def show_log_list():
# Shows all problematic logfiles of a host
def show_host_log_list(host):
- html.header(_("Logfiles of host %s") % host)
+ html.header(_("Logfiles of host %s") % host, stylesheets = stylesheets)
html.begin_context_buttons()
html.context_button(_("Services"),
"view.py?view_name=host&site=&host=%s" % htmllib.urlencode(host))
html.context_button(_("All logfiles"), "logwatch.py")
@@ -111,7 +112,7 @@ def list_logs(host, logfiles):
def show_file(host, filename):
file = form_file_to_int(filename)
- html.header(_("Logfiles of host %s: %s") % (host, filename))
+ html.header(_("Logfiles of host %s: %s") % (host, filename), stylesheets =
stylesheets)
html.begin_context_buttons()
html.context_button(_("Services"),
"view.py?view_name=host&site=&host=%s" % htmllib.urlencode(host))
html.context_button(_("All logfiles of Host"),
"logwatch.py?host=%s" % htmllib.urlencode(host))
@@ -170,7 +171,7 @@ def show_file(host, filename):
def do_log_ack(host, filename):
file = form_file_to_int(filename)
file_display = form_file_to_ext(file)
- html.header(_("Acknowledge logfile %s - %s") % (htmllib.attrencode(host),
file_display))
+ html.header(_("Acknowledge logfile %s - %s") % (htmllib.attrencode(host),
file_display), stylesheets = stylesheets)
html.begin_context_buttons()
html.context_button(_("All logfiles of Host"),
"logwatch.py?host=%s" % htmllib.urlencode(host))
diff --git a/web/plugins/pages/shipped.py b/web/plugins/pages/shipped.py
index 6e8ca6c..41f996f 100644
--- a/web/plugins/pages/shipped.py
+++ b/web/plugins/pages/shipped.py
@@ -27,7 +27,7 @@
# Import modules that contain the page functions
import main
-import page_logwatch
+import logwatch
import views
import sidebar
import actions
@@ -50,7 +50,7 @@ pagehandlers.update({
"count_context_button" : views.ajax_count_button,
"export_views" : views.ajax_export,
"view" : views.page_view,
- "logwatch" : page_logwatch.page,
+ "logwatch" : logwatch.page,
"side" : sidebar.page_side,
"sidebar_add_snapin" : sidebar.page_add_snapin,
"sidebar_snapin" : sidebar.ajax_snapin,