From f73aed8d7b24b4502f47f5b7a13c24b1a460bc87 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 25 Jun 2012 17:14:33 +0000 Subject: [PATCH] 2012-06-25 Miguel de Dios * include/functions_graph.php: cleaned source code style. * include/functions_reporting.php: added subtype into the title in "Top N". Merged from 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6705 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 ++++++++ .../include/functions_reporting.php | 23 +++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a89468664b..7815a99367 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2012-06-25 Miguel de Dios + + * include/functions_graph.php: cleaned source code style. + + * include/functions_reporting.php: added subtype into the title + in "Top N". + + Merged from 4.0.2 + 2012-06-25 Juan Manuel Ramon * include/functions_visual_map.php diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 9ada8ba817..fae632ec17 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -3602,10 +3602,29 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f } break; case 'top_n': - reporting_header_content($mini, $content, $report, $table, __('Top').' '.$content['top_n_value']); + $top_n = $content['top_n']; + + switch ($top_n) { + //Max + case 1: + $type_top_n = __('Max'); + break; + //Min + case 2: + $type_top_n = __('Min'); + break; + //Nothing or Average + case 0: //If nothing is selected then it will be shown the average data + case 3: + $type_top_n = __('Avg'); + break; + } + + reporting_header_content($mini, $content, $report, $table, + __('Top').' '.$content['top_n_value'] . '
' . $type_top_n); $order_uptodown = $content['order_uptodown']; - $top_n = $content['top_n']; + $top_n_value = $content['top_n_value']; $show_graph = $content['show_graph'];