From e0e098a7a649eaca71bce55b6a377be2b603fb71 Mon Sep 17 00:00:00 2001 From: "tatiana.llorente@artica.es" Date: Wed, 19 Sep 2018 16:51:31 +0200 Subject: [PATCH 1/2] Added module name and agent name in actions enable and disable module - #2783 --- .../godmode/agentes/configurar_agente.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index b0999eb638..4fee505d10 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -1760,13 +1760,15 @@ if (!empty($duplicate_module)) { // DUPLICATE agent module ! // ===================== if ($enable_module) { $result = modules_change_disabled($enable_module, 0); - + $modulo_nombre = db_get_row_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$enable_module.""); + $modulo_nombre = $modulo_nombre['nombre']; + if ($result === NOERR) { enterprise_hook('config_agents_enable_module_conf', array($id_agente, $enable_module)); - db_pandora_audit("Module management", 'Enable ' . $enable_module); + db_pandora_audit("Module management", 'Enable #' . $enable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } else { - db_pandora_audit("Module management", 'Fail to enable ' . $enable_module); + db_pandora_audit("Module management", 'Fail to enable #' . $enable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } ui_print_result_message ($result, @@ -1775,13 +1777,15 @@ if ($enable_module) { if ($disable_module) { $result = modules_change_disabled($disable_module, 1); - + $modulo_nombre = db_get_row_sql("SELECT nombre FROM tagente_modulo WHERE id_agente_modulo = ".$disable_module.""); + $modulo_nombre = $modulo_nombre['nombre']; + if ($result === NOERR) { enterprise_hook('config_agents_disable_module_conf', array($id_agente, $disable_module)); - db_pandora_audit("Module management", 'Disable ' . $disable_module); + db_pandora_audit("Module management", 'Disable #' . $disable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } else { - db_pandora_audit("Module management", 'Fail to disable ' . $disable_module); + db_pandora_audit("Module management", 'Fail to disable #' . $disable_module . ' | ' . $modulo_nombre . ' | ' . $agent["alias"]); } ui_print_result_message ($result, From 51af767549b9d8c202cec42fcaa2d434d5953b9c Mon Sep 17 00:00:00 2001 From: "tatiana.llorente@artica.es" Date: Fri, 21 Sep 2018 09:21:21 +0200 Subject: [PATCH 2/2] Limited number of characters shown in the table - #2783 --- pandora_console/general/logon_ok.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index c2ecec56da..1c720b6373 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -274,7 +274,12 @@ if (!empty($all_data)) { . human_time_comparation($session['utimestamp'], 'tiny'); $data[3] = $session_ip_origen; $description = str_replace(array(',', ', '), ', ', $session['descripcion']); - $data[4] = '
' . io_safe_output($description) . '
'; + if(strlen($description)>100){ + $data[4] = '
' . io_safe_output(substr($description, 0, 150).'...') . '
'; + } + else{ + $data[4] = '
' . io_safe_output($description) . '
'; + } array_push ($table->data, $data); }