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

This commit is contained in:
Tatiana Llorente 2020-01-13 18:19:50 +01:00 committed by Daniel Rodriguez
parent ffce6399b0
commit 1747806256
1 changed files with 32 additions and 0 deletions

View File

@ -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);