From fe001a9cb481c71cc0893f29a9cee904642c418f Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Diaz Date: Wed, 7 Oct 2015 11:33:12 +0200 Subject: [PATCH] New visualization of agent view --- .../operation/agentes/estado_generalagente.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index 54c412dfe8..33a7cb7341 100755 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -503,14 +503,17 @@ if (!empty($network_interfaces)) { } $acl_tags = tags_get_acl_tags($config['id_user'], $group_array, 'ER', 'event_condition', 'AND', '', true, array(), true); + + $id_modules_array = array(); + $id_modules_array[] = $interface['status_module_id']; + $sqlEvents = sprintf(' SELECT * - FROM tevento - WHERE id_agente = ( - SELECT id_agente - FROM tagente_estado - WHERE id_agente_modulo = ' . $interface['status_module_id'] . ') - '); + FROM tevento te + INNER JOIN tagente_estado tae + ON te.id_agentmodule = tae.id_agente_modulo + AND tae.id_agente_modulo IN (%s) + ', implode(',', $id_modules_array)); $sqlLast_contact = sprintf (' SELECT last_try