Module: check_mk
Branch: master
Commit: 32d50e144c7d63067a220c02db045f7d2c158f7f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=32d50e144c7d63…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 24 13:52:04 2018 +0100
Fixed larger graph legends being cut off in graph dashlets
Change-Id: If656c75c748ce02777385aaafbf5bf0903e22256
---
web/htdocs/metrics.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index 7c5aef5..de830e9 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -1750,10 +1750,11 @@ def host_service_graph_dashlet_cmk(graph_identification,
custom_graph_render_opt
if graph_render_options["show_legend"]:
# TODO FIXME: This graph artwork is calulated twice. Once here and once in
render_graphs_from_specification_html()
graph_artwork = compute_graph_artwork(graph_recipe, graph_data_range,
graph_render_options)
- graph_render_options["size"] = (
- graph_render_options["size"][0],
- graph_render_options["size"][1] -
graph_legend_height_ex(graph_render_options, graph_artwork)
- )
+ if graph_artwork["curves"]:
+ graph_render_options["size"] = (
+ graph_render_options["size"][0],
+ graph_render_options["size"][1] -
graph_legend_height_ex(graph_render_options, graph_artwork)
+ )
html_code = render_graphs_from_definitions([graph_recipe], graph_data_range,
graph_render_options, render_async=False)
html.write(html_code)