Module: check_mk
Branch: master
Commit: 73cebda12fcfc71253f4192adbc73255071a6cb6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=73cebda12fcfc7…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 29 16:34:13 2012 +0200
New configuration parameter page_heading for the HTML page heads
---
ChangeLog | 2 ++
web/htdocs/config.py | 3 +++
web/htdocs/main.py | 11 ++++++++---
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3d5262a..829312d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
* Quicksearch: display site name if more than one different site
is present in the current search result list
* FIX: Fixed encoding problem in "custom notification" message
+ * New configuration parameter page_heading for the HTML page heads
+ of the main frameset (%s will be replaced with OMD site name)
BI
* FIX: Fixed filtering of Single-Host Aggregations
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 9e88fdf..abcb965 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -577,6 +577,9 @@ custom_style_sheet = None
# URL for start page in main frame (welcome page)
start_url = "dashboard.py"
+# Page heading for main frame set
+page_heading = "Check_MK %s"
+
# Timeout for rescheduling of host- and servicechecks
reschedule_timeout = 10.0
diff --git a/web/htdocs/main.py b/web/htdocs/main.py
index 69dcc53..4e0be86 100644
--- a/web/htdocs/main.py
+++ b/web/htdocs/main.py
@@ -24,16 +24,21 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-import config
+import defaults, config
def page_index():
start_url = html.var("start_url", config.start_url)
html.req.headers_out.add("Cache-Control", "max-age=7200,
public");
+ if "%s" in config.page_heading:
+ heading = config.page_heading % (defaults.omd_site or "Multisite")
+ else:
+ heading = config.page_heading
+
html.write("""
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
- <title>Check_MK Multisite</title>
+ <title>%s</title>
<link rel="shortcut icon" href="images/favicon.ico"
type="image/ico">
</head>
<frameset cols="280,*" frameborder="0" framespacing="0"
border="0">
@@ -41,7 +46,7 @@ def page_index():
<frame src="%s" name="main" noresize>
</frameset>
</html>
-""" % start_url)
+""" % (heading, start_url))
def page_main():
html.header("Check_MK Multisite")