Merge branch 'ent-13783-macro-_event_id_-no-esta-mostrando-id-del-evento' into 'develop'

Ent 13783 macro  event id  no esta mostrando id del evento

See merge request artica/pandorafms!7416
This commit is contained in:
Matias Didier 2024-05-24 13:53:00 +00:00
commit 6c58a0e55e
1 changed files with 19 additions and 0 deletions

View File

@ -3847,7 +3847,17 @@ function events_get_response_target(
$eventObjt = new PandoraFMS\Event();
}
if (is_metaconsole() === true && (int) $server_id > 0) {
$node = new Node($server_id);
$node->connect();
}
$event = db_get_row('tevento', 'id_evento', $event_id);
if (is_metaconsole() === true && $server_id > 0) {
$node->disconnect();
}
$target = io_safe_output(db_get_value('target', 'tevent_response', 'id', $event_response['id']));
// Replace parameters response.
@ -3877,6 +3887,11 @@ function events_get_response_target(
}
}
if (is_metaconsole() === true && (int) $server_id > 0) {
$node = new Node($server_id);
$node->connect();
}
// Replace macros.
if (strpos($target, '_agent_alias_') !== false) {
$agente_table_name = 'tagente';
@ -4238,6 +4253,10 @@ function events_get_response_target(
);
}
if (is_metaconsole() === true && $server_id > 0) {
$node->disconnect();
}
return $target;
}