From 1747806256f72fd2fdd4a26e20860f8503930535 Mon Sep 17 00:00:00 2001 From: Tatiana Llorente Date: Mon, 13 Jan 2020 18:19:50 +0100 Subject: [PATCH] Ent 3136 no se ven los eventos en el mapa de servicios cuando haces click en los elementos de un servicio creado en la meta --- pandora_console/operation/events/events.php | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 700a2026c1..9cabe15b47 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -135,6 +135,10 @@ $id_agent = get_parameter( 'filter[id_agent]', $filter['id_agent'] ); +$text_module = get_parameter( + 'filter[text_module]', + $filter['text_module'] +); $id_agent_module = get_parameter( 'filter[id_agent_module]', $filter['id_agent_module'] @@ -210,10 +214,38 @@ $id_source_event = get_parameter( $filter['id_source_event'] ); +$server_id = get_parameter( + 'filter[server_id]', + $filter['id_server_meta'] +); + +if (is_metaconsole()) { + // Connect to node database. + $id_node = $server_id; + if ($id_node != 0) { + if (metaconsole_connect(null, $id_node) != NOERR) { + return false; + } + } +} + + if (empty($text_agent) && !empty($id_agent)) { $text_agent = agents_get_alias($id_agent); } +if (empty($text_module) && !empty($id_agent_module)) { + $text_module = modules_get_agentmodule_name($id_agent_module); + $text_agent = agents_get_alias(modules_get_agentmodule_agent($id_agent_module)); +} + +if (is_metaconsole()) { + // Return to metaconsole database. + if ($id_node != 0) { + metaconsole_restore_db(); + } +} + // Ajax responses. if (is_ajax()) { $get_events = get_parameter('get_events', 0);