diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 1d6561a794..2b9e2b73d4 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3912,6 +3912,14 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', require_once ($config["homedir"] . '/include/functions_graph.php'); + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } + $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); $return = array(); @@ -3963,12 +3971,17 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $graph["stacked"], $report["datetime"], $only_image, - ui_get_full_url(false, false, false, false)); + ui_get_full_url(false, false, false, false), + $ttl); break; case 'data': break; } + if ($config['metaconsole']) { + metaconsole_restore_db(); + } + return reporting_check_structure_content($return); }