From 7b7db80c11ff0c017fa7f6c015604e4f96601c6b Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Tue, 18 Feb 2014 11:56:24 +0000 Subject: [PATCH] 2014-02-18 Juan Manuel Ramon * operation/agentes/ver_agente.php: Fixed agent tooltip for metaconsole networkmap. Now check ACL tags are checked. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9446 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/operation/agentes/ver_agente.php | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 406cfacb2f..c4e7e1bb2c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-02-18 Juan Manuel Ramon + + * operation/agentes/ver_agente.php: Fixed agent tooltip + for metaconsole networkmap. Now check ACL tags are checked. + 2014-02-17 Juan Manuel Ramon * operation/agentes/status_monitor.php: Fixed tag combo, diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 696a3f202f..f850ba0c09 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -431,7 +431,18 @@ if (is_ajax ()) { echo ''.__('Last contact').': '.human_time_comparation($agent['ultimo_contacto']).'
'; echo ''.__('Last remote contact').': '.human_time_comparation($agent['ultimo_contacto_remoto']).'
'; - + + # Fix : Only show agents with module with tags of user profile + $_user_tags = tags_get_user_tags($config['id_user'], 'RR'); + + $_sql_post = ''; + if ($_user_tags !== false) { + + $_tags = implode(',', array_keys($_user_tags)); + + $_sql_post .= ' AND tagente_modulo.id_agente_modulo IN (SELECT a.id_agente_modulo FROM tagente_modulo a, ttag_module b WHERE a.id_agente_modulo=b.id_agente_modulo AND b.id_tag IN (' . $_tags . ')) '; + + } $sql = sprintf ('SELECT tagente_modulo.descripcion, tagente_modulo.nombre @@ -440,6 +451,9 @@ if (is_ajax ()) { AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_estado.estado = 1', $id_agent); + + $sql .= $_sql_post; + if ($metaconsole) { if (metaconsole_connect($server) != NOERR) { return;