Merge branch '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' into 'develop'

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

See merge request artica/pandorafms!2939
This commit is contained in:
Daniel Rodriguez 2020-01-13 18:19:50 +01:00
commit 914f232e69
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);