From 59fdb8d297ea7571dd9b6db17f0ce59a7aa617d9 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 13 Apr 2016 18:24:07 +0200 Subject: [PATCH] Fixed problems with url in public console. Tiquet: #3556 --- pandora_console/include/functions_visual_map.php | 7 ++++++- pandora_console/include/graphs/fgraph.php | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index e384b78f1c..0c154906e5 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -776,9 +776,14 @@ function visual_map_print_item($mode = "read", $layoutData, true, true, true, 1, false, $graph_javascript); } else { + if ($isExternalLink) + $homeurl = $config['homeurl']; + else + $homeurl = ''; + $img = grafico_modulo_sparse($id_module, $period, 0, $width, $height, '', null, false, 1, false, 0, '', 0, 0, - true, true, '', 1, false, '', false, false, true, + true, true, $homeurl, 1, false, '', false, false, true, $layoutData['image'], null, false, $graph_javascript); } diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index c026abb795..1cc8f785b7 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -46,6 +46,7 @@ if (!empty($graph_type)) { include_once($homeurl . 'include/graphs/functions_gd.php'); include_once($homeurl . 'include/graphs/functions_utils.php'); include_once($homeurl . 'include/graphs/functions_d3.php'); + include_once($homeurl . 'include/graphs/functions_flot.php'); } // Clean the output buffer and turn off output buffering @@ -541,6 +542,8 @@ function line_graph($flash_chart, $chart_data, $width, $height, $color, $unit = '', $ttl = 1, $homeurl = '', $backgroundColor = 'white', $dashboard = false, $vconsole = false) { + include_once("functions_flot.php"); + setup_watermark($water_mark, $water_mark_file, $water_mark_url); if (empty($chart_data)) {