From fb9e801bb69f90d94fb3037404adc9f278130f5e Mon Sep 17 00:00:00 2001 From: fermin831 Date: Wed, 30 Jan 2019 18:10:19 +0100 Subject: [PATCH] Formatted nt top n data (kbs instead bytes and millars separators) Former-commit-id: 9067cad9e04ef8d485d1535b4c6bff4571776c74 --- pandora_console/include/functions_reporting_html.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index 767e693fa5..10784120cc 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -3945,7 +3945,7 @@ function reporting_html_nt_top_n ($table, $item, $mini) { $table_top->width = "100%"; $table_top->class = "databox data"; $table_top->head['host'] = __('Agent'); - $table_top->head['bytes'] = __('Bytes'); + $table_top->head['bytes'] = __('Kilobytes'); $table_top->head['pkts'] = __('Packages'); // Build the table for sent packages @@ -3955,8 +3955,8 @@ function reporting_html_nt_top_n ($table, $item, $mini) { foreach ($item["data"]["send"] as $s_item) { $table_top->data[] = array( 'host' => $s_item["host"], - 'bytes' => $s_item["sum_bytes"], - 'pkts' => $s_item["sum_pkts"] + 'bytes' => remove_right_zeros(number_format($s_item["sum_bytes"]/1024, $config['graph_precision'])), + 'pkts' => remove_right_zeros(number_format($s_item["sum_pkts"], $config['graph_precision'])) ); } $table->data["send_title"] = "

" . __("Network traffic sent") . "

"; @@ -3971,8 +3971,8 @@ function reporting_html_nt_top_n ($table, $item, $mini) { foreach ($item["data"]["recv"] as $s_item) { $table_top->data[] = array( 'host' => $s_item["host"], - 'bytes' => $s_item["sum_bytes"], - 'pkts' => $s_item["sum_pkts"] + 'bytes' => remove_right_zeros(number_format($s_item["sum_bytes"]/1024, $config['graph_precision'])), + 'pkts' => remove_right_zeros(number_format($s_item["sum_pkts"], $config['graph_precision'])) ); } $table->data["recv_title"] = "

" . __("Network traffic received") . "

";