From 19024e63d304a6d854e1f8f05e324813a813f450 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Mon, 8 Jan 2024 18:05:29 +0100 Subject: [PATCH] implement several changes in top-n connection report item --- pandora_console/include/functions_netflow.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_netflow.php b/pandora_console/include/functions_netflow.php index 51b74c59b0..770314f507 100644 --- a/pandora_console/include/functions_netflow.php +++ b/pandora_console/include/functions_netflow.php @@ -374,12 +374,12 @@ function netflow_top_n_table(array $data, int $total_bytes, bool $show_extended= if ($show_extended === true) { $table->data[$i][2] = network_format_bytes($value['ibytes']); $table->data[$i][3] = network_format_bytes($value['obytes']); - $table->data[$i][4] = network_format_bytes($value['ipackages']); - $table->data[$i][5] = network_format_bytes($value['opackages']); + $table->data[$i][4] = (empty($value['ipackages']) === true) ? 0 : $value['ipackages']; + $table->data[$i][5] = (empty($value['opackages']) === true) ? 0 : $value['opackages']; $table->data[$i][6] = $value['traffic'].' %'; } else { $table->data[$i][2] = network_format_bytes($value['bytes']); - $table->data[$i][3] = network_format_bytes($value['ipackages']); + $table->data[$i][3] = (empty($value['ipackages']) === true) ? 0 : $value['ipackages']; $table->data[$i][4] = $value['traffic'].' %'; }