diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4a93159cd2..de1630ca83 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-01-27 Sergio Martin + + * include/functions_events.php: Fixed metaconsole event + colors for incident #526 + 2014-01-27 Sergio Martin * include/functions_alerts.php: Fixed the group of the diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index da1c45b54e..d8a666f56a 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -132,17 +132,16 @@ function events_get_events_grouped($sql_post, $offset = 0, $pagination = 1, $met GROUP_CONCAT(DISTINCT id_evento SEPARATOR ',') AS similar_ids, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep, MIN(utimestamp) AS timestamp_rep_min, - (SELECT owner_user FROM tevento WHERE id_evento = MAX(te.id_evento)) owner_user, - (SELECT id_usuario FROM tevento WHERE id_evento = MAX(te.id_evento)) id_usuario, - (SELECT id_agente FROM tevento WHERE id_evento = MAX(te.id_evento)) id_agente, - (SELECT criticity FROM tevento WHERE id_evento = MAX(te.id_evento)) AS criticity, - (SELECT ack_utimestamp FROM tevento WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp + (SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user, + (SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario, + (SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente, + (SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, + (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp FROM $table te WHERE 1=1 " . $sql_post . " GROUP BY estado, evento, id_agentmodule" . $groupby_extra . " ORDER BY timestamp_rep DESC LIMIT " . $offset . "," . $pagination; } - break; case "postgresql": if ($total) { @@ -156,11 +155,11 @@ function events_get_events_grouped($sql_post, $offset = 0, $pagination = 1, $met array_to_string(array_agg(DISTINCT id_evento), ',') AS similar_ids, COUNT(*) AS event_rep, MAX(utimestamp) AS timestamp_rep, MIN(utimestamp) AS timestamp_rep_min, - (SELECT owner_user FROM tevento WHERE id_evento = MAX(te.id_evento)) owner_user, - (SELECT id_usuario FROM tevento WHERE id_evento = MAX(te.id_evento)) id_usuario, - (SELECT id_agente FROM tevento WHERE id_evento = MAX(te.id_evento)) id_agente, - (SELECT criticity FROM tevento WHERE id_evento = MAX(te.id_evento)) AS criticity, - (SELECT ack_utimestamp FROM tevento WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp + (SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user, + (SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario, + (SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente, + (SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, + (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp FROM $table te WHERE 1=1 " . $sql_post . " GROUP BY estado, evento, id_agentmodule, id_evento, id_agente, id_usuario, id_grupo, estado, timestamp, utimestamp, event_type, id_alert_am, criticity, user_comment, tags, source, id_extra" . $groupby_extra . " @@ -186,9 +185,11 @@ function events_get_events_grouped($sql_post, $offset = 0, $pagination = 1, $met LISTAGG(user_comment, '') AS user_comment, MAX(utimestamp) AS timestamp_rep, LISTAGG(id_evento, '') AS similar_ids, MIN(utimestamp) AS timestamp_rep_min, - (SELECT owner_user FROM tevento WHERE id_evento = MAX(te.id_evento)) owner_user, - (SELECT id_usuario FROM tevento WHERE id_evento = MAX(te.id_evento)) id_usuario, - (SELECT criticity FROM tevento WHERE id_evento = MAX(te.id_evento)) AS criticity + (SELECT owner_user FROM $table WHERE id_evento = MAX(te.id_evento)) owner_user, + (SELECT id_usuario FROM $table WHERE id_evento = MAX(te.id_evento)) id_usuario, + (SELECT id_agente FROM $table WHERE id_evento = MAX(te.id_evento)) id_agente, + (SELECT criticity FROM $table WHERE id_evento = MAX(te.id_evento)) AS criticity, + (SELECT ack_utimestamp FROM $table WHERE id_evento = MAX(te.id_evento)) AS ack_utimestamp FROM $table te WHERE 1=1 " . $sql_post . " GROUP BY estado, to_char(evento), id_agentmodule" . $groupby_extra . ") b