From 8d3432e7f2f81f20b6a0cc989f3e48c808b56f80 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 3 Feb 2023 11:19:58 +0100 Subject: [PATCH] #9047 REVIEW LOGS styles --- .../include/class/AuditLog.class.php | 46 +++++++++++++------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/class/AuditLog.class.php b/pandora_console/include/class/AuditLog.class.php index 235652711c..4986cc399a 100644 --- a/pandora_console/include/class/AuditLog.class.php +++ b/pandora_console/include/class/AuditLog.class.php @@ -96,7 +96,10 @@ class AuditLog extends HTML // Datatables list. try { $columns = [ - 'id_usuario', + [ + 'text' => 'id_usuario', + 'class' => 'w50px', + ], 'accion', 'fecha', 'ip_origen', @@ -116,11 +119,11 @@ class AuditLog extends HTML $columns, [ 'text' => 'security', - 'class' => 'w80px action_buttons show_security_info', + 'class' => 'w50px action_buttons show_security_info', ], [ 'text' => 'action', - 'class' => 'w80px action_buttons show_extended_info', + 'class' => 'w50px action_buttons show_extended_info', ] ); @@ -199,16 +202,28 @@ class AuditLog extends HTML [ 'label' => __('Free search').ui_print_help_tip(__('Search filter by User, Action, Date, Source IP or Comments fields content'), true), 'type' => 'text', - 'class' => 'w200px', + 'class' => 'w150px', 'id' => 'filter_text', 'name' => 'filter_text', ], [ - 'label' => __('Max. hours old'), - 'type' => 'text', - 'class' => 'w100px', - 'id' => 'filter_period', - 'name' => 'filter_period', + 'label' => __('Max. hours old'), + 'type' => 'select', + 'class' => 'w20px', + 'select2_enable' => true, + 'sort' => false, + 'selected' => 168, + 'fields' => [ + 24 => __('1 day'), + 168 => __('7 days'), + 360 => __('15 days'), + 744 => __('1 month'), + 2160 => __('3 months'), + 4320 => __('6 months'), + 8760 => __('1 Year'), + ], + 'id' => 'filter_period', + 'name' => 'filter_period', ], [ 'label' => __('IP'), @@ -223,7 +238,7 @@ class AuditLog extends HTML 'nothing' => __('All'), 'nothing_value' => '-1', 'sql' => 'SELECT DISTINCT(accion), accion AS text FROM tsesion', - 'class' => 'mw250px', + 'class' => 'mw200px', 'id' => 'filter_type', 'name' => 'filter_type', ], @@ -235,7 +250,7 @@ class AuditLog extends HTML 'sql' => 'SELECT id_user, id_user AS text FROM tusuario UNION SELECT "SYSTEM" AS id_user, "SYSTEM" AS text UNION SELECT "N/A" AS id_user, "N/A" AS text', - 'class' => 'mw250px', + 'class' => 'mw200px', 'id' => 'filter_user', 'name' => 'filter_user', ], @@ -346,9 +361,12 @@ class AuditLog extends HTML ).ui_print_timestamp($tmp->utimestamp, true); if (enterprise_installed() === true) { - $tmp->security = enterprise_hook('cell1EntepriseAudit', [$tmp->id_sesion]); - $tmp->action = enterprise_hook('cell2EntepriseAudit', []); - $tmp->extendedInfo = enterprise_hook('rowEnterpriseAudit', [$tmp->id_sesion]); + $extendedInfo = enterprise_hook('rowEnterpriseAudit', [$tmp->id_sesion]); + if (empty($extendedInfo) === false) { + $tmp->security = enterprise_hook('cell1EntepriseAudit', [$tmp->id_sesion]); + $tmp->action = enterprise_hook('cell2EntepriseAudit', []); + $tmp->extendedInfo = $extendedInfo; + } } $carry[] = $tmp;