From 1bbbbcaee18f4791d9846d05c646d6d1c2ac2be5 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 4 Mar 2021 10:57:52 +0000 Subject: [PATCH] =?UTF-8?q?Ent=206890=20condici=C3=B3n=20agentes=20vista?= =?UTF-8?q?=20sap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pandora_console/include/functions_agents.php | 22 ++++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 58aa7b550a..3f893cbaeb 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -3751,6 +3751,7 @@ function agents_get_sap_agents($id_agent) // Available modules. // If you add more modules, please update SAP.pm. $sap_modules = [ + 0 => 'SAP connection', 160 => __('SAP Login OK'), 109 => __('SAP Dumps'), 111 => __('SAP lock entry list'), @@ -3760,9 +3761,9 @@ function agents_get_sap_agents($id_agent) 105 => __('SAP IDOC OK'), 150 => __('SAP WP without active restart'), 151 => __('SAP WP stopped'), - 102 => __('Average time of SAPGUI response '), + 102 => __('Average time of SAPGUI response'), 180 => __('Dialog response time'), - 103 => __('Dialog Logged users '), + 103 => __('Dialog Logged users'), 192 => __('TRFC in error'), 195 => __('QRFC in error SMQ2'), 116 => __('Number of Update WPs in error'), @@ -3770,13 +3771,16 @@ function agents_get_sap_agents($id_agent) $array_agents = []; foreach ($sap_modules as $module => $key) { - $sql = 'SELECT ta.id_agente,ta.alias, ta.id_grupo - FROM tagente ta - INNER JOIN tagente_modulo tam - ON tam.id_agente = ta.id_agente - WHERE tam.nombre - LIKE "%SAP%" - GROUP BY ta.id_agente'; + $sql = sprintf( + 'SELECT ta.id_agente,ta.alias + FROM tagente ta + INNER JOIN tagente_modulo tam + ON tam.id_agente = ta.id_agente + WHERE tam.nombre + LIKE "%s" + GROUP BY ta.id_agente', + io_safe_input($key) + ); // ACL groups. $agent_groups = array_keys(users_get_groups($config['id_user']));