diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 54bbb2ea00..db94a38e4f 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -3285,11 +3285,19 @@ function series_type_graph_array($data, $show_elements_graph){ function generator_chart_to_pdf($type_graph_pdf, $params, $params_combined = false, $module_list = false){ global $config; + if(is_metaconsole()){ + $hack_metaconsole = "../../"; + } + else{ + $hack_metaconsole = ""; + } + $file_js = $config["homedir"] . "/include/web2image.js"; - $url = $config["homeurl"] . "include/chart_generator.php"; + $url = ui_get_full_url(false) . $hack_metaconsole ."include/chart_generator.php"; + $img_file = "img_". uniqid() .".png"; $img_path = $config["homedir"] . "/attachment/" . $img_file; - $img_url = $config["homeurl"] . "attachment/" . $img_file; + $img_url = ui_get_full_url(false) . $hack_metaconsole . "attachment/" . $img_file; $width_img = 500; $height_img = (isset($config['graph_image_height'])) ? $config['graph_image_height'] : 280;