From 44724e648dc5bef144d82c87c3bcca5880a2ab4b Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Wed, 1 Mar 2017 12:10:01 +0100 Subject: [PATCH] Fixed graphs in reports. Ticket #411 --- pandora_console/include/functions_reporting.php | 7 ++++++- pandora_console/include/graphs/flot/pandora.flot.js | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 5d20944bfb..1167ac41c8 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5740,7 +5740,12 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $return['type'] = 'custom_graph'; if (empty($content['name'])) { - $content['name'] = __('Simple graph'); + if ($type_report == "custom_graph") { + $content['name'] = __('Custom graph'); + } + else { + $content['name'] = __('Simple graph'); + } } $return['title'] = $content['name']; diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 4317b660af..6d4fee8779 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1671,8 +1671,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, plot.setSelection(ranges); }); - //~ var legends = $('#legend_' + graph_id + ' .legendLabel'); - + var legends = $('#legend_' + graph_id + ' .legendLabel'); var updateLegendTimeout = null; var latestPosition = null;