From 7c1e3b9a07d47068bbe839e236c52df19fd43459 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 (cherry picked from commit 0b1454f0e854f2b4c25361f94c6fae95e95747d9) --- 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 2a275102f3..8627cccee2 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1339,6 +1339,8 @@ function reporting_event_report_group($report, $content, metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } @@ -1383,6 +1385,8 @@ function reporting_event_report_module($report, $content) { metaconsole_restore_db(); } + $return['total_events'] = count($return['data']); + return reporting_check_structure_content($return); } @@ -2201,6 +2205,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 8a2dd9db6e..e697330b90 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':