From 29743cfa743dd620d78744b2990d7f425aae0d36 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 22 May 2015 17:55:06 +0200 Subject: [PATCH] Fixed the 'projection_graph' item in metaconsole reports. TICKET: #2249 --- pandora_console/include/functions_reporting.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 06a593f6a5..d58087b745 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2999,6 +2999,14 @@ function reporting_projection_graph($report, $content, global $config; + if ($config['metaconsole']) { + $id_meta = metaconsole_get_id_server($content["server_name"]); + + + $server = metaconsole_get_connection_by_id ($id_meta); + metaconsole_connect($server); + } + $return['type'] = 'projection_graph'; if (empty($content['name'])) { @@ -3047,9 +3055,9 @@ function reporting_projection_graph($report, $content, 0, 0, $report["datetime"], - true, + $only_image, ui_get_full_url(false, false, false, false) . '/', - 1, + $ttl, // Important parameter, this tell to graphic_combined_module function that is a projection graph $output_projection, $content['top_n_value'] @@ -3059,6 +3067,10 @@ function reporting_projection_graph($report, $content, break; } + if ($config['metaconsole']) { + metaconsole_restore_db(); + } + return reporting_check_structure_content($return); }