From 0b4ee357804b47c116d8bca7460e445011f61e53 Mon Sep 17 00:00:00 2001 From: Calvo Date: Wed, 27 Sep 2023 11:01:21 +0200 Subject: [PATCH] Fix query agent events --- pandora_console/include/ajax/events.php | 2 +- pandora_console/include/functions_events.php | 5 +---- pandora_console/operation/agentes/status_events.php | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index ddf36ee912..be8b095d25 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -2000,7 +2000,7 @@ if ($table_events) { include_once 'include/functions_graph.php'; $id_agente = (int) get_parameter('id_agente'); - $all_events_24h = (int) get_parameter('all_events_24h', 1); + $all_events_24h = (int) get_parameter('all_events_24h', 0); // Fix: for tag functionality groups have to be all user_groups // (propagate ACL funct!). diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 32113327b8..64a2f2b84e 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2404,14 +2404,11 @@ function events_print_event_table( $filter = '1 = 1'; } - $secondary_join = 'LEFT JOIN tagent_secondary_group tasg ON tevento.id_agente = tasg.id_agent'; - $sql = sprintf( 'SELECT DISTINCT tevento.* - FROM tevento %s + FROM tevento WHERE %s %s ORDER BY utimestamp DESC LIMIT %d', - $secondary_join, $agent_condition, $filter, $limit diff --git a/pandora_console/operation/agentes/status_events.php b/pandora_console/operation/agentes/status_events.php index 30df1fb897..39b8b9edf0 100755 --- a/pandora_console/operation/agentes/status_events.php +++ b/pandora_console/operation/agentes/status_events.php @@ -43,7 +43,7 @@ html_print_div( ?>