From 1950f614e74cafd133ee40db4ba0dc69eea547e6 Mon Sep 17 00:00:00 2001 From: ramonn Date: Mon, 23 Jan 2012 18:20:30 +0000 Subject: [PATCH] 2012-01-23 Ramon Novoa * 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 + + * include/functions_netflow.php: Aesthetic fixes to netflow report + tables. + 2012-01-23 Ramon Novoa * 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] = '' . __($aggregate) . ''; - $table->data[0][1] = '' . __($unit) . ''; + $x = 0; + + $table->head = array (); + $table->head[0] = '' . __($aggregate) . ''; + $table->head[1] = '' . __($unit) . ''; 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] = ''.__($aggregate).''; + + $table->head = array(); + $table->head[0] = ''.__('Timestamp').''; $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++) {