From 7bacb869f283e8e4af2469f287453e7060d2064f Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 12 Sep 2019 12:02:28 +0200 Subject: [PATCH] Fixed historical_data report in metaconsole --- pandora_console/include/functions_reporting.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 4abf5152c1..08197624fc 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3105,6 +3105,13 @@ function reporting_historical_data($report, $content) $content['name'] = __('Historical data'); } + if (is_metaconsole()) { + $id_meta = metaconsole_get_id_server($content['server_name']); + + $server = metaconsole_get_connection_by_id($id_meta); + $connection = metaconsole_connect($server); + } + $id_agent = agents_get_module_id( $content['id_agent_module'] ); @@ -3196,6 +3203,10 @@ function reporting_historical_data($report, $content) $return['data'] = $data; + if (is_metaconsole() && $connection > 0) { + metaconsole_restore_db(); + } + return reporting_check_structure_content($return); }