fixes in event macros (responses)
This commit is contained in:
parent
ef50b47269
commit
75bb4338b7
|
@ -3811,7 +3811,7 @@ function events_get_response_target(
|
||||||
if (strpos($target, '_alert_id_') !== false) {
|
if (strpos($target, '_alert_id_') !== false) {
|
||||||
$target = str_replace(
|
$target = str_replace(
|
||||||
'_alert_id_',
|
'_alert_id_',
|
||||||
empty($event['is_alert_am']) ? __('N/A') : $event['is_alert_am'],
|
empty($event['id_alert_am']) ? __('N/A') : $event['id_alert_am'],
|
||||||
$target
|
$target
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -3893,6 +3893,15 @@ function events_get_response_target(
|
||||||
$target = str_replace('_current_user_', $config['id_user'], $target);
|
$target = str_replace('_current_user_', $config['id_user'], $target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This will replace the macro with the command timeout value.
|
||||||
|
if (strpos($target, '_command_timeout_') !== false) {
|
||||||
|
$target = str_replace(
|
||||||
|
'_command_timeout_',
|
||||||
|
$event_response['command_timeout'],
|
||||||
|
$target
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $target;
|
return $target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6973,7 +6982,7 @@ function events_get_field_value_by_event_id(
|
||||||
if (strpos($value, '_group_name_') !== false) {
|
if (strpos($value, '_group_name_') !== false) {
|
||||||
$value = str_replace(
|
$value = str_replace(
|
||||||
'_group_name_',
|
'_group_name_',
|
||||||
groups_get_name($event['id_grupo'], true),
|
io_safe_output(groups_get_name($event['id_grupo'], true)),
|
||||||
$value
|
$value
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue