Ent 6482 fallo en la agrupación de eventos
This commit is contained in:
parent
8144d3bc95
commit
43ca5e4972
|
@ -1244,7 +1244,11 @@ function events_get_all(
|
||||||
// Order.
|
// Order.
|
||||||
$order_by = '';
|
$order_by = '';
|
||||||
if (isset($order, $sort_field)) {
|
if (isset($order, $sort_field)) {
|
||||||
$order_by = events_get_sql_order($sort_field, $order);
|
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);
|
$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->agent_name = io_safe_output($tmp->agent_name);
|
||||||
$tmp->ack_utimestamp = ui_print_timestamp(
|
$tmp->ack_utimestamp = ui_print_timestamp(
|
||||||
$tmp->ack_utimestamp,
|
$tmp->ack_utimestamp,
|
||||||
|
|
Loading…
Reference in New Issue