From 91797af397aee2f2cc5b4b3e2706f05f343ab520 Mon Sep 17 00:00:00 2001
From: Ramon Novoa <rnovoa@artica.es>
Date: Mon, 23 Jan 2012 18:20:30 +0000
Subject: [PATCH] 2012-01-23  Ramon Novoa  <rnovoa@artica.es>

	* include/functions_netflow.php: Aesthetic fixes to netflow report
	  tables.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5408 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                     |  5 +++++
 pandora_console/include/functions_netflow.php | 18 ++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 4c93f2c287..1003063d85 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-23  Ramon Novoa  <rnovoa@artica.es>
+
+	* include/functions_netflow.php: Aesthetic fixes to netflow report
+	  tables.
+
 2012-01-23  Ramon Novoa  <rnovoa@artica.es>
 
 	* operation/menu.php,
diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php
index 54de3f5320..f23f0cbfbb 100644
--- a/pandora_console/include/functions_netflow.php
+++ b/pandora_console/include/functions_netflow.php
@@ -195,10 +195,11 @@ function netflow_stat_table ($data, $start_date, $end_date, $aggregate, $unit){
 	$table->class = 'databox';
 	$table->data = array();
 	$j = 0;
-	$x = 1;
-
-	$table->data[0][0] = '<b>' . __($aggregate) . '</b>';
-	$table->data[0][1] = '<b>' . __($unit) . '</b>';
+	$x = 0;
+	
+	$table->head = array ();
+	$table->head[0] = '<b>' . __($aggregate) . '</b>';
+	$table->head[1] = '<b>' . __($unit) . '</b>';
 	
 	while (isset ($data[$j])) {
 		$agg = $data[$j]['agg'];
@@ -256,20 +257,21 @@ function netflow_data_table ($data, $start_date, $end_date, $aggregate) {
 	$table->size = array ('50%');
 	$table->class = 'databox';
 	$table->data = array();
-	
-	$table->data[0][0] = '<b>'.__($aggregate).'</b>';
+
+	$table->head = array();
+	$table->head[0] = '<b>'.__('Timestamp').'</b>';
 
 	$j = 0;
 	$source_index = array ();
 	$source_count = 0;
 	foreach ($data['sources'] as $source => $null) {
-		$table->data[0][$j+1] = $source;
+		$table->head[$j+1] = $source;
 		$source_index[$j] = $source;
 		$source_count++;
 		$j++;
 	}
 
-	$i = 1;
+	$i = 0;
 	foreach ($data['data'] as $timestamp => $values) {
 		$table->data[$i][0] = date ($time_format, $timestamp);
 		for ($j = 0; $j < $source_count; $j++) {