diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d7b49d679a..a0e203e68a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2010-01-14 Javier Lanz + + * trunk/pandora_console/include/functions_html.php: print_select function edited to deal with long fields. + * trunk/pandora_console/include/functions_ui.php: printTruncateText function edited to truncate in the middle of the word. + * trunk/pandora_console/pandoradb.sql: changed type for field "nombre" in "tgrupo" table. + * trunk/pandora_console/pandora_console_install: added support for Fedora. Thanks to philipmbrown. + * trunk/pandora_console/extensions/agents_modules.php: truncated text to 19 characters showing agent names + * trunk/pandora_console/operation/agentes/group_view.php: Truncated group name to deal with long fields. + * trunk/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql: changed type for field "nombre" in "tgrupo" table. + * trunk/pandora_console/godmode/groups/group_list.php: Truncated group name to deal with long fields. + * trunk/pandora_console/godmode/agentes/modificar_agente.php: truncated agent names to deal with long fields. + 2010-01-14 Juan Manuel Ramon * include/functions_db.php: In get_group_agents function, now agent's name search is not case sensitive. diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index ae3b5c620f..33bc0bcbeb 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -218,7 +218,7 @@ function mainAgentsModules() { echo ""; - $file_name = string2image(printTruncateText($agent['nombre'],17, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0); + $file_name = string2image(printTruncateText($agent['nombre'],19, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0); echo "".print_image($file_name, true, array('title' => $agent['nombre'])).""; $agent_modules = get_agent_modules($agent['id_agente']); diff --git a/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql new file mode 100644 index 0000000000..ebcd4cd1f3 --- /dev/null +++ b/pandora_console/extras/pandoradb_migrate_v3.2_to_v4.0.sql @@ -0,0 +1,24 @@ +-- Pandora FMS - the Flexible Monitoring System +-- ============================================ +-- Copyright (c) 2010 Artica Soluciones Tecnológicas, http://www.artica.es +-- Please see http://pandora.sourceforge.net for full contribution list + +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation for version 2. +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +-- PLEASE NO NOT USE MULTILINE COMMENTS +-- Because Pandora Installer don't understand them +-- and fails creating database !!! + +-- ----------------------------------------------------- +-- Table `tgrupo` +-- ----------------------------------------------------- +ALTER TABLE `tgrupo` MODIFY `nombre` text; diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index e2f3091212..27c227ce43 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -271,7 +271,7 @@ if ($agents !== false) { echo ''; echo "".$agent["nombre"].""; + id_agente=".$agent["id_agente"]."'>".printTruncateText($agent["nombre"], 30, true).""; if ($agent["disabled"]) { print_help_tip(__('Disabled')); echo ""; diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 3183b8ec68..c2e294fab6 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -255,10 +255,10 @@ foreach ($groups as $id_group => $group) { if ($group['hash_branch']) { $data[0] = ''.$tabulation . ' ' . - '' . $symbol . ' '. $group['nombre'].''; + '' . $symbol . ' '. printTruncateText($group['nombre']).''; } else { - $data[0] = ''.$tabulation . ' '. $group['nombre'].''; + $data[0] = ''.$tabulation . ' '. printTruncateText($group['nombre']).''; } $data[1] = print_group_icon($group['id_grupo'], true); $data[2] = $group['disabled'] ? __('Disabled') : __('Enabled'); diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 27c13429e2..23d0b55e7a 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -248,10 +248,10 @@ function print_select ($fields, $name, $selected = '', $script = '', $nothing = } if ($style === false) { - $styleText = ''; + $styleText = 'style="max-width: 180px"'; } else { - $styleText = 'style="' . $style . '"'; + $styleText = 'style="max-width: 180px; ' .$style . '"'; } $output .= '