From a1978e93b1f727d360d61622970940d334b7f872 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 22 Feb 2017 16:52:42 +0100 Subject: [PATCH] Inserted alias in pandora audit --- pandora_console/godmode/alerts/alert_list.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 051c8a2aaf..a56ed8bcac 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -86,18 +86,18 @@ if ($create_alert) { "talert_templates","id", $id_alert_template); $module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); - $agent_name = agents_get_name (db_get_value ("id_agente", + $agent_alias = agents_get_alias (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); // Audit the creation only when the alert creation is correct if ($id) { db_pandora_audit("Alert management", - "Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'", + "Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'", false, false, 'ID: ' . $id); } else { db_pandora_audit("Alert management", - "Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'"); + "Fail Added alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'"); } $messageAction = ui_print_result_message ($id, @@ -127,18 +127,18 @@ if ($delete_alert) { $id_agent_module = $temp["id_agent_module"]; $alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template); $module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); - $agent_name = agents_get_name( + $agent_alias = agents_get_alias( db_get_value("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); $result = alerts_delete_alert_agent_module ($id_alert_agent_module); if ($result) { db_pandora_audit("Alert management", - "Deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_name'"); + "Deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'"); } else { db_pandora_audit("Alert management", - "Fail to deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_name'"); + "Fail to deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_alias'"); } $messageAction = ui_print_result_message ($result,