From a00bcc35c46ebb79e3c037c3a2686b8f17c1a2e3 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 27 Jul 2021 14:14:23 +0200 Subject: [PATCH] Metaconsole shows historical events on reports --- pandora_console/include/functions_reporting.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index cd68a65bcf..6b10b7c439 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1845,14 +1845,25 @@ function reporting_event_report_group( } $id_meta = 0; + $node_historical_event_enbled = ''; if (is_metaconsole() === true && empty($content['server_name']) === false) { $id_meta = metaconsole_get_id_server($content['server_name']); $server = metaconsole_get_connection_by_id($id_meta); metaconsole_connect($server); + + // Check if node historical event is enable. + $sql = sprintf( + 'SELECT value + FROM tconfig + WHERE token LIKE "history_event_enabled"' + ); + + $result = db_get_row_sql($sql); + $node_historical_event_enbled = $result['value']; } $history = false; - if ($config['history_event_enabled']) { + if ($config['history_event_enabled'] || $node_historical_event_enbled) { $history = true; }