diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f262dca28d..8615e76a59 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-01-17 Javier Lanz + + * trunk/pandora_console/include/functions_ui.php: Fixed an error in print_agent_name + * trunk/pandora_console/extensions/module_groups.php: Fixed extension, now works properly. Fix #3160077 + * trunk/pandora_console/operation/agentes/estado_generalagente.php: Truncated agent & module names + * trunk/pandora_console/godmode/reporting/visual_console_builder.elements.php: Fixed table style + 2010-01-16 Raúl Mateos * pandoradb.sql, extras/pandoradb_migrate_v3.2_to_v4.0.sql: Updated diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 740bdf3459..4661eede56 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -126,7 +126,7 @@ function mainModuleGroups() { $row = array(); - array_push($row, $name); + array_push($row, printTruncateText($name, 20)); foreach ($modelGroups as $idModelGroup => $modelGroup) { $query = sprintf($sql,$idAgentGroup, $idModelGroup); @@ -157,7 +157,7 @@ function mainModuleGroups() { $count = 0; foreach ($states as $idState => $state) { - $count = $state; + $count += $state; } $color = 'transparent'; //Defaut color for cell diff --git a/pandora_console/godmode/reporting/visual_console_builder.elements.php b/pandora_console/godmode/reporting/visual_console_builder.elements.php index 9f7ce79c3d..2e74c0ee85 100644 --- a/pandora_console/godmode/reporting/visual_console_builder.elements.php +++ b/pandora_console/godmode/reporting/visual_console_builder.elements.php @@ -66,11 +66,18 @@ $table->head = array (); $table->head['icon'] = ''; $table->head[0] = __('Label') . ' / ' . __('Agent'); $table->head[1] = __('Image') . ' / ' . __('Module'); -$table->head[2] = __('Width x Height - Max value'); +$table->head[2] = __('Width x Height
Max value'); $table->head[3] = __('Period') . ' / ' . __('Position'); $table->head[4] = __('Parent') . ' / ' . __('Map linked'); $table->head[5] = __('Action'); +$table->align[0] = "center"; +$table->align[1] = "center"; +$table->align[2] = "center"; +$table->align[3] = "center"; +$table->align[4] = "center"; +$table->align[5] = "center"; + $table->data = array(); //Background diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 00b777dbc2..3633fb5434 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -351,7 +351,7 @@ function print_agent_name ($id_agent, $return = false, $cutoff = 0, $style = '', $agent_name = (string) get_agent_name ($id_agent); $agent_name_full = $agent_name; if($cutname) { - $agent_name = printTruncateText($agent_name, $cutname); + $agent_name = printTruncateText($agent_name, $cutoff); } $output = ''.$agent_name.''; diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index cc3cbee4ea..4873badaf3 100644 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -69,10 +69,10 @@ echo ''; //Agent name echo ''; if ($agent['disabled']) { - $cellName = "" . print_agent_name ($agent["id_agente"], true, "upper") .print_help_tip(__('Disabled'), true) . ""; + $cellName = "" . print_agent_name ($agent["id_agente"], true, 35, "upper", true) .print_help_tip(__('Disabled'), true) . ""; } else { - $cellName = print_agent_name ($agent["id_agente"], true, "upper"); + $cellName = print_agent_name ($agent["id_agente"], true, 35, "upper", true); } echo ''; echo ''; echo ''; // Agent version
'.__('Agent name').''.$cellName.' '; @@ -115,7 +115,7 @@ echo '
'.__('Group').''; echo print_group_icon ($agent["id_grupo"], true); echo ' ('; -echo get_group_name ($agent["id_grupo"]); +echo printTruncateText(get_group_name ($agent["id_grupo"])); echo ')