diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8658411b89..2302517548 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2012-02-13 Sergio Martin + + * include/graphs/functions_pchart.php + include/graphs/fgraph.php + include/functions_reporting.php + include/functions_visual_map.php: Fixed little + graphs into the visual maps of the widgets + (min height control added) + 2012-02-13 Miguel de Dios * operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php: diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 75a76ec64a..3bb1288039 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1869,8 +1869,9 @@ function reporting_get_group_detailed_event ($id_group, $period = 0, $date = 0, $table->head = array (); $table->head[0] = __('Event name'); $table->head[1] = __('Event type'); - $table->head[2] = __('Criticity'); - $table->head[3] = __('Timestamp'); + $table->head[2] = __('Agent'); + $table->head[3] = __('Criticity'); + $table->head[4] = __('Timestamp'); $events = events_get_group_events($id_group, $period, $date); @@ -1879,8 +1880,9 @@ function reporting_get_group_detailed_event ($id_group, $period = 0, $date = 0, $data = array (); $data[0] = io_safe_output($event['evento']); $data[1] = $event['event_type']; - $data[2] = get_priority_name ($event['criticity']); - $data[3] = $event['timestamp']; + $data[2] = agents_get_name ($event['id_agente']); + $data[3] = get_priority_name ($event['criticity']); + $data[4] = $event['timestamp']; array_push ($table->data, $data); } diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index cdebba96df..921b2ec9eb 100644 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -947,20 +947,18 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line echo ''; } } - if ($resizedMap) { + if ($resizedMap) { + $layout_data['width'] = ((integer)($proportion * $layout_data['width'])); + $layout_data['height'] = ((integer)($proportion * $layout_data['height'])); + } + // ATTENTION: DO NOT USE & here because is bad-translated and doesnt work // resulting fault image links :( - - echo grafico_modulo_sparse ($layout_data['id_agente_modulo'], $layout_data['period'], - false, ((integer)($proportion * $layout_data['width'])), ((integer)($proportion * $layout_data['height'])), - '', null, false, 1, false, 0, '', 0, 0, true, true); - } - else { - echo grafico_modulo_sparse ($layout_data['id_agente_modulo'], $layout_data['period'], - false, $layout_data['width'], $layout_data['height'], - '', null, false, 1, false, 0, '', 0, 0, true, true); - } + echo grafico_modulo_sparse ($layout_data['id_agente_modulo'], $layout_data['period'], + false, $layout_data['width'], $layout_data['height'], + '', null, false, 1, false, 0, '', 0, 0, true, true, '', 2); + echo ""; echo ""; break; diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index c06a13a746..9f0dfbfb86 100755 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -194,6 +194,11 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "", $homeurl="", $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) { + // ATTENTION: The min height is 101 + if($height <= 100) { + $height = 101; + } + if (empty($chart_data)) { return ''; } diff --git a/pandora_console/include/graphs/functions_pchart.php b/pandora_console/include/graphs/functions_pchart.php index d84aabc68b..065248bb41 100755 --- a/pandora_console/include/graphs/functions_pchart.php +++ b/pandora_console/include/graphs/functions_pchart.php @@ -215,7 +215,7 @@ switch($graph_type) { case 'pie3d': case 'pie2d': break; - case 'default': + default: if(!is_array(reset($data_values))) { $data_values = array($data_values); if(is_array($colors) && !empty($colors)) {