From 0b1454f0e854f2b4c25361f94c6fae95e95747d9 Mon Sep 17 00:00:00 2001 From: enriquecd Date: Wed, 7 Dec 2016 15:45:30 +0100 Subject: [PATCH] Add total evens count in reports header - #3162 --- pandora_console/include/functions_reporting.php | 6 ++++++ pandora_console/include/functions_reporting_html.php | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index cfab2e4c80..503858607f 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1389,6 +1389,8 @@ function reporting_event_report_group($report, $content, metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } @@ -1433,6 +1435,8 @@ function reporting_event_report_module($report, $content) { metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } @@ -2278,6 +2282,8 @@ function reporting_event_report_agent($report, $content, metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index f59f0914c9..18ec03c65c 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -130,10 +130,8 @@ function reporting_html_print_report($report, $mini = false) { $item['date']['to'], $label); - if ($item["description"] != "") { - $table->data['description_row']['description'] = $item["description"]; + $table->data['description_row']['description'] = $item["description"]." - Total events: ".$item["total_events"]; $table->colspan['description_row']['description'] = 3; - } switch ($item['type']) { case 'availability':