Module: check_mk
Branch: master
Commit: e116efdaf0324d1386870b11eb638824b23a5d05
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e116efdaf0324d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 29 16:40:08 2012 +0200
FIX: Fix problem where snapins where invisible
---
ChangeLog | 1 +
web/htdocs/sidebar.py | 19 ++++++++++---------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 63a8e38..00a348e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* 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)
+ * FIX: Fix problem where snapins where invisible
BI
* FIX: Fixed filtering of Single-Host Aggregations
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index ee45bff..e9521ac 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -42,6 +42,8 @@ def load_plugins():
loaded_with_language = current_language
# Load all snapins
+ global sidebar_snapins
+ sidebar_snapins = {}
load_web_plugins("sidebar", globals())
# Declare permissions: each snapin creates one permission
@@ -153,15 +155,14 @@ def page_side():
for name, state in user_config:
if not name in sidebar_snapins or not config.may("sidesnap." + name):
continue
- if state in [ "open", "closed" ]:
- refresh_url = render_snapin(name, state)
- refresh_time = sidebar_snapins.get(name).get("refresh", 0)
- if refresh_time > 0:
- refresh_snapins.append([name, refresh_time, refresh_url])
-
- restart = sidebar_snapins.get(name, {}).get('restart', False)
- if restart:
- restart_snapins.append(name)
+ refresh_url = render_snapin(name, state)
+ refresh_time = sidebar_snapins.get(name).get("refresh", 0)
+ if refresh_time > 0:
+ refresh_snapins.append([name, refresh_time, refresh_url])
+
+ restart = sidebar_snapins.get(name, {}).get('restart', False)
+ if restart:
+ restart_snapins.append(name)
html.write('</div>')
sidebar_foot()
html.write('</div>')