Fix query agent events

This commit is contained in:
Calvo 2023-09-27 11:01:21 +02:00
parent a8a201cf19
commit 0b4ee35780
3 changed files with 3 additions and 6 deletions

View File

@ -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!).

View File

@ -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

View File

@ -43,7 +43,7 @@ html_print_div(
?>
<script type="text/javascript">
$(document).ready(function() {
events_table(1);
events_table(0);
});
function events_table(all_events_24h){