Module: check_mk
Branch: master
Commit: 0306684aee80f58ad163d7abbf250e917083c731
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0306684aee80f5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 11 07:00:24 2017 +0200
Fixed rendering snapins on dashboards
Change-Id: I802677dfd72276fb41b61dfad98e94e74c05f138
---
web/plugins/dashboard/dashlets.py | 7 ++++---
web/plugins/sidebar/shipped.py | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/web/plugins/dashboard/dashlets.py b/web/plugins/dashboard/dashlets.py
index 48763a5..089770b 100644
--- a/web/plugins/dashboard/dashlets.py
+++ b/web/plugins/dashboard/dashlets.py
@@ -816,7 +816,7 @@ def dashlet_snapin(nr, dashlet):
html.open_div(id_="snapin_container_%s" % dashlet['snapin'],
class_="snapin")
html.open_div(id_="snapin_%s" % dashlet['snapin'],
class_="content")
sidebar.render_snapin_styles(snapin)
- snapin['render']()
+ snapin.show()
html.close_div()
html.close_div()
html.close_div()
@@ -826,12 +826,13 @@ def dashlet_snapin(nr, dashlet):
def dashlet_snapin_get_snapins():
import sidebar # FIXME: HACK, clean this up somehow
- return sorted([ (k, v['title']) for k, v in sidebar.sidebar_snapins.items()
], key=lambda x: x[1])
+ return sorted([ (k, v.title()) for k, v in sidebar.sidebar_snapins.items() ],
+ key=lambda x: x[1])
def dashlet_snapin_title(dashlet):
import sidebar # FIXME: HACK, clean this up somehow
- return sidebar.sidebar_snapins[dashlet['snapin']]['title']
+ return sidebar.sidebar_snapins[dashlet['snapin']].title()
dashlet_types["snapin"] = {
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index c758169..fed9e12 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -1876,7 +1876,7 @@ class VirtualHostTree(SidebarSnapin):
def description(self):
return _("This snapin shows tree views of your hosts based on their tag
"
"classifications. You can configure which tags to use in your
"
- "global settings of Multisite."),
+ "global settings of Multisite.")
def show(self):