Merge branch 'ent-5227-Problema-encoding-aplicación-politicas' into 'develop'

Ent 5227 problema encoding aplicación politicas

See merge request artica/pandorafms!3055
This commit is contained in:
Alejandro Fraguas 2020-02-10 12:14:19 +01:00
commit 0538bd5185
3 changed files with 24 additions and 4 deletions

View File

@ -830,7 +830,14 @@ foreach ($modules as $module) {
$data[4] .= ui_print_help_tip(__('The policy modules of data type will only update their intervals when policy is applied.'), true);
}
$data[5] = ui_print_truncate_text($module['descripcion'], 'description', false);
if ($module['id_modulo'] == MODULE_DATA && $module['id_policy_module'] != 0) {
$module_description = utf8_decode($module['descripcion']);
} else {
$module_description = $module['descripcion'];
}
$data[5] = ui_print_truncate_text($module_description, 'description', false);
$data[6] = ui_print_status_image($status, htmlspecialchars($title), true);

View File

@ -1004,8 +1004,14 @@ if (check_login()) {
$data[3] .= ' <a class="relations_details" href="ajax.php?page=operation/agentes/estado_monitores&get_relations_tooltip=1&id_agente_modulo='.$module['id_agente_modulo'].'">'.html_print_image('images/link2.png', true, ['id' => 'relations-details-'.$module['id_agente_modulo'], 'class' => 'img_help']).'</a> ';
}
$module_description = '';
if ($module['id_modulo'] == MODULE_DATA && $module['id_policy_module'] != 0) {
$module_description = utf8_decode($module['descripcion']);
} else {
$module_description = $module['descripcion'];
}
$data[4] = ui_print_string_substr($module['descripcion'], 60, true, 8);
$data[4] = ui_print_string_substr($module_description, 60, true, 8);
if ($module['datos'] != strip_tags($module['datos'])) {

View File

@ -95,7 +95,7 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
$row = [];
$row['title'] = __('Warning status');
$row['data'] = $warning_status_str;
$table->data['watning_status'] = $row;
$table->data['warning_status'] = $row;
// Critical Min/Max
if (modules_is_string_type($module['id_tipo_modulo'])) {
@ -124,9 +124,16 @@ function treeview_printModuleTable($id_module, $server_data=false, $no_head=fals
$table->data['module_group'] = $row;
// Description
$module_description = '';
if ($module['id_modulo'] == MODULE_DATA && $module['id_policy_module'] != 0) {
$module_description = utf8_decode($module['descripcion']);
} else {
$module_description = $module['descripcion'];
}
$row = [];
$row['title'] = __('Description');
$row['data'] = ui_print_truncate_text($module['descripcion'], 'description', true, true, true, '[&hellip;]');
$row['data'] = ui_print_truncate_text($module_description, 'description', true, true, true, '[&hellip;]');
$table->data['description'] = $row;
// Tags