Merge branch 'ent-3959-eventos-de-validacion-manual-de-alertas' into 'develop'

Changed message to module name

See merge request artica/pandorafms!2518
This commit is contained in:
Alejandro Fraguas 2019-06-20 10:22:15 +02:00
commit 57e3c147c8
1 changed files with 3 additions and 1 deletions

View File

@ -1783,12 +1783,14 @@ function alerts_validate_alert_agent_module($id_alert_agent_module, $noACLs=fals
['id' => $id]
);
$template_name = io_safe_output(db_get_value('name', 'talert_templates', 'id', $alert['id_alert_template']));
$module_name = io_safe_output(db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $alert['id_agent_module']));
if ($result > 0) {
// Update fired alert count on the agent
db_process_sql(sprintf('UPDATE tagente SET update_alert_count=1 WHERE id_agente = %d', $agent_id));
events_create_event(
'Manual validation of alert for '.alerts_get_alert_template_description($alert['id_alert_template']),
'Manual validation of alert '.$template_name.' assigned to '.$module_name.'',
$group_id,
$agent_id,
1,