From f99d1f1bd89ad6b033538e555ff5d7f9a807e004 Mon Sep 17 00:00:00 2001
From: juanmanuelr <noreply@pandorafms.org>
Date: Thu, 2 Feb 2012 18:39:58 +0000
Subject: [PATCH] 2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

	* include/functions_graph.php
	 include/functions_visual_map.php: Improved module graphs on visual
	 console.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5476 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                        |  6 ++++++
 pandora_console/include/functions_graph.php      | 10 +++++-----
 pandora_console/include/functions_visual_map.php |  6 +++---
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 22c8a7e040..a73b27b740 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-02 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
+
+	* include/functions_graph.php
+	 include/functions_visual_map.php: Improved module graphs on visual
+	 console.
+
 2012-02-02  Sancho Lerena <slerena@artica.es>
 
 	* config_process.php: Updated build.
diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index d0f83680c9..045e56ec1e 100755
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -89,7 +89,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
 			$previous_data['utimestamp'] = $datelimit;
 			array_unshift ($data, $previous_data);
 		}
-
+	
 		// Get next data
 		$nextData = modules_get_next_data ($agent_module_id, $date);
 		if ($nextData !== false) {
@@ -204,13 +204,13 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
 			$time_format = 'H:i';
 		}
 		elseif ($period < 1296000) {
-			$time_format = 'M d H:i';
+			$time_format = "M \nd H:i";
 		}
 		elseif ($period < 2592000) {
-			$time_format = 'M d H\h';
+			$time_format = "M \nd H\h";
 		} 
 		else {
-			$time_format = 'M d H\h';
+			$time_format = "M \nd H\h";
 		}
 
 		$timestamp_short = date($time_format, $timestamp);
@@ -275,7 +275,7 @@ function grafico_modulo_sparse ($agent_module_id, $period, $show_events,
 			}
 		}
 	}
-
+	
 	// Return chart data and don't draw
 	if ($return_data == 1) {
 		return $chart;
diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php
index 729b0fbd57..cdebba96df 100644
--- a/pandora_console/include/functions_visual_map.php
+++ b/pandora_console/include/functions_visual_map.php
@@ -123,7 +123,7 @@ function visual_map_print_item($layoutData) {
 			break;
 		case MODULE_GRAPH:
 			$img = grafico_modulo_sparse($id_module, $period, 0, $width,
-				$height, '', null, false, 0, false, 0, '', 0, 0, true, true);
+				$height, '', null, false, 1, false, 0, '', 0, 0, true, true);
 			$img = str_replace('>', 'class="image" id="image_' . $id . '" />', $img);
 			
 			echo '<div id="' . $id . '" class="item module_graph" style="left: 0px; top: 0px; color: ' . $color . '; text-align: center; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top .  'px; margin-left: ' . $left .  'px;">';
@@ -954,12 +954,12 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $draw_line
 
 						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, 0, false, 0, '', 0, 0, true, true);
+							'', 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, 0, false, 0, '', 0, 0, true, true);
+							'', null, false, 1, false, 0, '', 0, 0, true, true);
 					}
 					echo "</a>";
 					echo "</div>";