Ent 6482 fallo en la agrupación de eventos
This commit is contained in:
parent
8144d3bc95
commit
43ca5e4972
|
@ -1244,8 +1244,12 @@ function events_get_all(
|
|||
// Order.
|
||||
$order_by = '';
|
||||
if (isset($order, $sort_field)) {
|
||||
if (isset($filter['group_rep']) && $filter['group_rep'] == 1) {
|
||||
$order_by = events_get_sql_order('MAX('.$sort_field.')', $order);
|
||||
} else {
|
||||
$order_by = events_get_sql_order($sort_field, $order);
|
||||
}
|
||||
}
|
||||
|
||||
// Pagination.
|
||||
$pagination = '';
|
||||
|
|
|
@ -358,6 +358,21 @@ if (is_ajax()) {
|
|||
$tmp->comments = ui_print_comments($tmp->comments);
|
||||
}
|
||||
|
||||
// Show last event.
|
||||
if (isset($tmp->max_id_evento) && $tmp->max_id_evento !== $tmp->id_evento) {
|
||||
$max_event = db_get_row_sql(
|
||||
sprintf(
|
||||
'SELECT criticity, timestamp FROM %s
|
||||
WHERE id_evento = %s',
|
||||
($tmp->meta) ? 'tmetaconsole_event' : 'tevento',
|
||||
$tmp->max_id_evento
|
||||
)
|
||||
);
|
||||
|
||||
$tmp->timestamp = $max_event['timestamp'];
|
||||
$tmp->criticity = $max_event['criticity'];
|
||||
}
|
||||
|
||||
$tmp->agent_name = io_safe_output($tmp->agent_name);
|
||||
$tmp->ack_utimestamp = ui_print_timestamp(
|
||||
$tmp->ack_utimestamp,
|
||||
|
|
Loading…
Reference in New Issue