From 7ad716dd558449db1ce100938c233c91a740201e Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 28 Dec 2015 14:10:44 +0100 Subject: [PATCH] Added the return simple graph as data (for CSV reports) and the agent and module name. (cherry picked from commit b5c98afdce1fe8372662ee62060175d6e9a46075) --- pandora_console/include/functions_reporting.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index d8187d491f..7abd70054c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4296,6 +4296,8 @@ function reporting_simple_graph($report, $content, $type = 'dinamic', $return['title'] = $content['name']; $return['subtitle'] = $agent_name . " - " . $module_name; + $return['agent_name'] = $agent_name; + $return['module_name'] = $module_name; $return["description"] = $content["description"]; $return["date"] = reporting_get_date_text( $report, @@ -4385,6 +4387,15 @@ function reporting_simple_graph($report, $content, $type = 'dinamic', } break; case 'data': + $data = modules_get_agentmodule_data( + $content['id_agent_module'], + $content['period'], + $report["datetime"]); + + foreach ($data as $d) { + $return['chart'][$d['utimestamp']] = $d['data']; + } + break; }