From f39d502108227d334969d526a77ea14b14d33710 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 22 Jun 2022 10:11:24 +0200 Subject: [PATCH] refactor events meta pandora_enterprise#9086 --- pandora_console/include/functions_events.php | 6 +++++- pandora_console/include/functions_reporting.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index eb41714aea..f20ad62eb2 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2740,7 +2740,11 @@ function events_get_agent( 'te.utimestamp' ); - return $events['data']; + if (is_metaconsole() === true) { + $events = $events['data']; + } + + return $events; } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index e5bdb203c0..2e590a6487 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -10454,14 +10454,14 @@ function reporting_get_module_detailed_event( $event['data'] = []; } - // total_events + // Total events. if (isset($event['data'])) { $event['total_events'] = count($event['data']); } else { $event['total_events'] = 0; } - // graphs + // Graphs. if (!empty($force_width_chart)) { $width = $force_width_chart; }