diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index bb41341d0d..4b0f2198f3 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -55,55 +55,75 @@ function treeview_printModuleTable($id_module, $server_data = false) { return; } - echo '
'.__('Module name').' | '; - if ($module["disabled"]) $cellName = "" . ui_print_truncate_text ($module["nombre"], GENERIC_SIZE_TEXT, true, true, true, '[…]',"text-transform: uppercase;") . ui_print_help_tip(__('Disabled'), true) . ""; else $cellName = ui_print_truncate_text ($module["nombre"], GENERIC_SIZE_TEXT, true, true, true, '[…]',"text-transform: uppercase;"); - echo ''.$cellName.' | '; + $row = array(); + $row['title'] = __('Name'); + $row['data'] = "".$cellName.""; + $table->data['name'] = $row; // Interval - echo '||||||||
' . __('Interval') . ' | '; - echo '' . human_time_description_raw (modules_get_interval($module['id_agente_modulo']), true) . ' | ||||||||
' . __('Warning status') . ' | '; if (modules_is_string_type($module['id_tipo_modulo'])) { - echo '' . __('Str.') . ': ' . $module['str_warning'] . ' | ' . __('Min.') . ': ' . $module['min_warning'] . ' ' . __('Max.') . ': ' . $module['max_warning'] . ' | |||||||
' . __('Critical status') . ' | '; if (modules_is_string_type($module['id_tipo_modulo'])) { - echo '' . __('Str.') . ': ' . $module['str_warning'] . ' | ' . __('Min.') . ': ' . $module['min_critical'] . ' ' . __('Max.') . ': ' . $module['max_critical'] . ' | ';
+ $critical_status_str = __('Min.') . ': ' . $module['min_critical'] . '|||||||
'.__('Module group').' | '; - echo ''; $module_group = modules_get_modulegroup_name($module['id_module_group']); - + if ($module_group === false) - echo __('Not assigned'); + $module_group = __('Not assigned'); else - echo __("$module_group"); - echo ' | ||||||||
'.__('Description').' | '; - echo ''. ui_print_truncate_text ($module['descripcion'], 'description', true, true, true, '[…]') .' | ||||||||
'.__('Tags').' | '; - echo '' . $tags . ' | ||||||||
'.__('Last data').' | '; - echo ''; - if (!empty($last_data['utimestamp'])) { - echo $data; + $last_data_str = $data; if ($module['unit'] != '') { - echo " "; - echo '('.$module['unit'].')'; + $last_data_str .= " "; + $last_data_str .= '('.$module['unit'].')'; } - echo " "; - html_print_image('images/clock2.png', false, array('title' => $last_data["timestamp"], 'width' => '18px')); + $last_data_str .= " "; + $last_data_str .= html_print_image('images/clock2.png', true, array('title' => $last_data["timestamp"], 'width' => '18px')); } else { - echo '' . __('No data') . ''; + $last_data_str = '' . __('No data') . ''; } - echo ' |