Module: check_mk
Branch: master
Commit: 64b45721807ce98c048c462762d3eec668fcd661
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=64b45721807ce9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 4 10:48:21 2016 +0200
Dashboard graphs have now host/service name in title
---
web/plugins/dashboard/dashlets.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/web/plugins/dashboard/dashlets.py b/web/plugins/dashboard/dashlets.py
index 0af2067..28e548b 100644
--- a/web/plugins/dashboard/dashlets.py
+++ b/web/plugins/dashboard/dashlets.py
@@ -376,6 +376,7 @@ def dashlet_graph_reload_js(nr, dashlet):
})
graph_render_options = {
"show_legend": dashlet.get("show_legend", False),
+ "show_service" : dashlet.get("show_service", True),
}
return "dashboard_render_graph(%d, %s, %s, '%s')" % \
@@ -416,6 +417,11 @@ dashlet_types["pnpgraph"] = {
"graphs which are only available in the Check_MK Enterprise
Edition."),
default_value = False,
)),
+ ("show_service", Checkbox(
+ title = _("Show host/service name in title"),
+ label = _("Add the host/service to the graph title"),
+ default_value = True,
+ )),
],
"styles": """
.dashlet.pnpgraph .dashlet_inner {
@@ -430,6 +436,9 @@ dashlet_types["pnpgraph"] = {
.dashlet.pnpgraph .container {
background-color: #f8f4f0;
}
+.dashlet.pnpgraph div.title a {
+ color: #000;
+}
""",
"on_resize" : dashlet_graph_reload_js,
# execute this js handler instead of refreshing the dashlet by calling
"render" again