Module: check_mk
Branch: master
Commit: a8236feb565c1ced549ff10e1eb9716781367b04
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a8236feb565c1c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Nov 19 17:17:08 2014 +0100
#1506 FIX Fixed randomly hidden dashboard title
When dashboards with title enabled and without title were opened after each other,
it could happen randomly, that the dashboard with a title was hiding the title
behind the dashlets.
---
.werks/1506 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/dashboard.py | 5 +++--
web/plugins/dashboard/builtin.py | 3 +++
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/1506 b/.werks/1506
new file mode 100644
index 0000000..5626eaf
--- /dev/null
+++ b/.werks/1506
@@ -0,0 +1,12 @@
+Title: Fixed randomly hidden dashboard title
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.5i7
+Date: 1416413736
+
+When dashboards with title enabled and without title were opened after each other,
+it could happen randomly, that the dashboard with a title was hiding the title
+behind the dashlets.
diff --git a/ChangeLog b/ChangeLog
index 66bd4b3..25aa3db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@
* 1436 FIX: quicksearch: search with multiple patterns (h: / s:) no longer discards
the host pattern...
* 1438 FIX: quicksearch: fixed various non-working quicksearch filters...
* 1501 FIX: Legacy view formats created with 2014-09 snapshots are now converted...
+ * 1506 FIX: Fixed randomly hidden dashboard title...
WATO:
* 1170 Added buttons to move rules to top/bottom of the list to ruleset edit dialog
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 20abdf6..77cd07c 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -47,7 +47,6 @@ MAX = -1
# These settings might go into the config module, sometime in future,
# in order to allow the user to customize this.
-header_height = 60 # Distance from top of the screen to the lower border
of the heading
screen_margin = 5 # Distance from the left border of the main-frame to
the dashboard area
dashlet_padding = 21, 5, 5, 0, 4 # Margin (N, E, S, W, N w/o title) between outer border
of dashlet and its content
corner_overlap = 22
@@ -263,10 +262,12 @@ def render_dashboard(name):
title = visuals.visual_title('dashboard', board)
+ # Distance from top of the screen to the lower border of the heading
+ header_height = 60
+
# The title of the dashboard needs to be prefixed with the WATO path,
# in order to make it clear to the user, that he is seeing only partial
# data.
- global header_height
if not board.get('show_title'):
# Remove the whole header line
html.set_render_headfoot(False)
diff --git a/web/plugins/dashboard/builtin.py b/web/plugins/dashboard/builtin.py
index a7f6672..e486289 100644
--- a/web/plugins/dashboard/builtin.py
+++ b/web/plugins/dashboard/builtin.py
@@ -28,6 +28,7 @@ builtin_dashboards["main"] = {
"single_infos": [],
"context" : {},
"mtime" : 0,
+ "show_title" : True,
"title" : _("Main Overview"),
"topic" : _("Overview"),
"description" : _("This dashboard gives you a general overview on the
state of your "
@@ -198,6 +199,7 @@ if defaults.omd_site:
"single_infos": [],
"context" : {},
"mtime" : 0,
+ "show_title" : True,
"title" : _("Network Topology"),
"topic" : _("Overview"),
"description" : _("This dashboard uses the parent relationships of
your hosts to display a "
@@ -220,6 +222,7 @@ builtin_dashboards["simple_problems"] = {
"single_infos": [],
"context" : {},
"mtime" : 0,
+ "show_title" : True,
"title" : _("Host & Services Problems"),
"topic" : _("Overview"),
"description" : _("A compact dashboard which lists your unhandled host
and service problems."),