Merge branch 'ent-11961-16159-activar-show-all-events-24h-por-defecto-en-vista-de-ultimos-eventos-de-agente' into 'develop'

Agents show events 24h switch checked default

See merge request artica/pandorafms!6405
This commit is contained in:
Rafael Ameijeiras 2023-10-02 07:08:52 +00:00
commit 439d5b54aa
2 changed files with 2 additions and 5 deletions

View File

@ -2059,7 +2059,7 @@ if ($table_events) {
include_once 'include/functions_graph.php'; include_once 'include/functions_graph.php';
$id_agente = (int) get_parameter('id_agente'); $id_agente = (int) get_parameter('id_agente');
$all_events_24h = (int) get_parameter('all_events_24h'); $all_events_24h = (int) get_parameter('all_events_24h', 0);
// Fix: for tag functionality groups have to be all user_groups // Fix: for tag functionality groups have to be all user_groups
// (propagate ACL funct!). // (propagate ACL funct!).

View File

@ -2404,14 +2404,11 @@ function events_print_event_table(
$filter = '1 = 1'; $filter = '1 = 1';
} }
$secondary_join = 'LEFT JOIN tagent_secondary_group tasg ON tevento.id_agente = tasg.id_agent';
$sql = sprintf( $sql = sprintf(
'SELECT DISTINCT tevento.* 'SELECT DISTINCT tevento.*
FROM tevento %s FROM tevento
WHERE %s %s WHERE %s %s
ORDER BY utimestamp DESC LIMIT %d', ORDER BY utimestamp DESC LIMIT %d',
$secondary_join,
$agent_condition, $agent_condition,
$filter, $filter,
$limit $limit