#12037 Fix size of agent text and event text

This commit is contained in:
miguel angel rasteu 2023-09-11 11:41:30 +02:00
parent 8a41aa7f7a
commit 55fa824792
5 changed files with 33 additions and 40 deletions

View File

@ -811,7 +811,7 @@ foreach ($simple_alerts as $alert) {
$data[3] .= '<tr class="datos2">';
$data[3] .= '<td class="w50p">'.html_print_label_input_block(
__('Agent'),
ui_print_truncate_text($alias, 'agent_small', false, true, true, '[&hellip;]')
ui_print_truncate_text($alias, 'agent_medium', false, true, true, '[&hellip;]')
).'</td>';
$data[3] .= '<td class="w50p">'.html_print_label_input_block(
__('Module'),

View File

@ -501,7 +501,7 @@ if ($show_update_action_menu) {
$data .= '<td class="datos">';
$data .= ui_print_truncate_text(
$agent_alias,
'agent_small',
'agent_medium',
false,
true,
true,

View File

@ -1634,7 +1634,7 @@ function ui_format_alert_row(
$data[$index['actions']] .= '<tr class="datos2">';
$data[$index['actions']] .= '<td class="w50p">'.html_print_label_input_block(
__('Agent'),
ui_print_truncate_text($agente['alias'], 'agent_small', false, true, true, '[&hellip;]')
ui_print_truncate_text($agente['alias'], 'agent_medium', false, true, true, '[&hellip;]')
).'</td>';
$data[$index['actions']] .= '<td class="w50p">'.html_print_label_input_block(
__('Module'),

View File

@ -4,7 +4,6 @@
.ui-dialog .ui-corner-all .ui-widget {
border-radius: 0;
margin: 0;
padding: 0;
border: none;
}

View File

@ -509,10 +509,22 @@ if (is_ajax() === true) {
$tmp->evento = str_replace('"', '', io_safe_output($tmp->evento));
$event_text = $tmp->evento;
if (strlen($tmp->evento) >= 40) {
$tmp->evento = ui_print_truncate_text(
$tmp->evento,
40,
$tmp->evento = ui_print_truncate_text(
$tmp->evento,
$config['item_title_size_text'],
false,
true,
false,
'&hellip;',
true,
true,
);
if (empty($tmp->module_name) === false) {
$tmp->module_name = ui_print_truncate_text(
$tmp->module_name,
'module_medium',
false,
true,
false,
@ -522,22 +534,6 @@ if (is_ajax() === true) {
);
}
if (empty($tmp->module_name) === false) {
$tmp->module_name = io_safe_output($tmp->module_name);
if (strlen($tmp->module_name) >= 20) {
$tmp->module_name = ui_print_truncate_text(
$tmp->module_name,
20,
false,
true,
false,
'&hellip;',
true,
true,
);
}
}
if (empty($tmp->comments) === false) {
$tmp->comments = ui_print_comments($tmp->comments, 20);
}
@ -564,19 +560,16 @@ if (is_ajax() === true) {
}
}
$tmp->agent_name = io_safe_output($tmp->agent_name);
if (strlen($tmp->agent_name) >= 10) {
$tmp->agent_name = ui_print_truncate_text(
$tmp->agent_name,
10,
false,
true,
false,
'&hellip;',
true,
true,
);
}
$tmp->agent_name = ui_print_truncate_text(
$tmp->agent_name,
'agent_medium',
false,
true,
false,
'&hellip;',
true,
true,
);
$tmp->id_extra = io_safe_output($tmp->id_extra);
if (strlen($tmp->id_extra) >= 10) {
@ -944,10 +937,11 @@ if (is_ajax() === true) {
// Module name.
$tmp->id_agentmodule = $tmp->module_name;
if (strlen($tmp->id_agentmodule) >= 10) {
/*
if (strlen($tmp->id_agentmodule) >= 10) {
$tmp->id_agentmodule = ui_print_truncate_text(
$tmp->id_agentmodule,
10,
'module_small',
false,
true,
false,
@ -955,7 +949,7 @@ if (is_ajax() === true) {
true,
true,
);
}
}*/
// Options.
// Show more.