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
This commit is contained in:
ramonn 2012-01-23 18:20:30 +00:00
parent 9faeefd0a4
commit 1950f614e7
2 changed files with 15 additions and 8 deletions

View File

@ -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> 2012-01-23 Ramon Novoa <rnovoa@artica.es>
* operation/menu.php, * operation/menu.php,

View File

@ -195,10 +195,11 @@ function netflow_stat_table ($data, $start_date, $end_date, $aggregate, $unit){
$table->class = 'databox'; $table->class = 'databox';
$table->data = array(); $table->data = array();
$j = 0; $j = 0;
$x = 1; $x = 0;
$table->data[0][0] = '<b>' . __($aggregate) . '</b>'; $table->head = array ();
$table->data[0][1] = '<b>' . __($unit) . '</b>'; $table->head[0] = '<b>' . __($aggregate) . '</b>';
$table->head[1] = '<b>' . __($unit) . '</b>';
while (isset ($data[$j])) { while (isset ($data[$j])) {
$agg = $data[$j]['agg']; $agg = $data[$j]['agg'];
@ -257,19 +258,20 @@ function netflow_data_table ($data, $start_date, $end_date, $aggregate) {
$table->class = 'databox'; $table->class = 'databox';
$table->data = array(); $table->data = array();
$table->data[0][0] = '<b>'.__($aggregate).'</b>'; $table->head = array();
$table->head[0] = '<b>'.__('Timestamp').'</b>';
$j = 0; $j = 0;
$source_index = array (); $source_index = array ();
$source_count = 0; $source_count = 0;
foreach ($data['sources'] as $source => $null) { foreach ($data['sources'] as $source => $null) {
$table->data[0][$j+1] = $source; $table->head[$j+1] = $source;
$source_index[$j] = $source; $source_index[$j] = $source;
$source_count++; $source_count++;
$j++; $j++;
} }
$i = 1; $i = 0;
foreach ($data['data'] as $timestamp => $values) { foreach ($data['data'] as $timestamp => $values) {
$table->data[$i][0] = date ($time_format, $timestamp); $table->data[$i][0] = date ($time_format, $timestamp);
for ($j = 0; $j < $source_count; $j++) { for ($j = 0; $j < $source_count; $j++) {