diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index c3a25238f4..ccbe7f6dd2 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -4382,7 +4382,7 @@ function events_page_general($event) $data = []; $data[0] = __('Event name'); - $data[1] = events_display_name($event['evento']); + $data[1] = ''.events_display_name($event['evento']).''; $table_general->data[] = $data; $data = []; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 06c4b579ea..6c0db1db8f 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -162,6 +162,10 @@ function ui_print_truncate_text($text, $numChars=GENERIC_SIZE_TEXT, $showTextInA } if ($showTextInAToopTip) { + if (is_string($showTextInAToopTip)) { + $text = ui_print_truncate_text($showTextInAToopTip, ($numChars * 2), false, true, false); + } + $truncateText = $truncateText.ui_print_help_tip(htmlspecialchars($text), true); } else { if ($style !== false) { diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 5147b8e47e..ece97f1f9a 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -280,17 +280,9 @@ if (is_ajax()) { $events, function ($carry, $item) { $tmp = (object) $item; - $tmp->hint = ''; - $tmp->meta = false; + $tmp->evento = str_replace('"', '', io_safe_output($tmp->evento)); if (strlen($tmp->evento) >= 255) { - $tmp->hint = io_safe_output(chunk_split(substr($tmp->evento, 0, 600), 80, '
').'(...)'); - $tmp->meta = is_metaconsole(); - $tmp->evento = io_safe_output(substr($tmp->evento, 0, 253).'(...)'); - if (strpos($tmp->evento, ' ') === false) { - $tmp->evento = substr($tmp->evento, 0, 80).'(...)'; - } - } else { - $tmp->evento = io_safe_output($tmp->evento); + $tmp->evento = ui_print_truncate_text($tmp->evento, 255, $tmp->evento, true, false); } if ($tmp->module_name) { @@ -1661,10 +1653,6 @@ function process_datatables_item(item) { evn += '('+item.event_rep+') '; } evn += item.evento+''; - if(item.hint !== ''){ - let ruta = item.meta == true ? '../../images/tip_help.png' : 'images/tip_help.png'; - evn += ' '+item.hint+''; - } item.mini_severity = '
'; item.mini_severity += output;