Added some code for the reports in csv

(cherry picked from commit 473d96dd6f)
This commit is contained in:
mdtrooper 2015-12-28 15:56:41 +01:00
parent 7ad716dd55
commit bd9180338b
1 changed files with 12 additions and 0 deletions

View File

@ -2955,6 +2955,14 @@ function reporting_monitor_report($report, $content) {
$module = modules_get_agentmodule ($content['id_agent_module']); $module = modules_get_agentmodule ($content['id_agent_module']);
$module_name = io_safe_output(
modules_get_agentmodule_name($content['id_agent_module']));
$agent_name = io_safe_output(
modules_get_agentmodule_agent_name ($content['id_agent_module']));
$return['agent_name'] = $agent_name;
$return['module_name'] = $module_name;
$value = reporting_get_agentmodule_sla( $value = reporting_get_agentmodule_sla(
$content['id_agent_module'], $content['id_agent_module'],
$content['period'], $content['period'],
@ -3448,6 +3456,9 @@ function reporting_value($report, $content, $type) {
$return["description"] = $content["description"]; $return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content); $return["date"] = reporting_get_date_text($report, $content);
$return['agent_name'] = $agent_name;
$return['module_name'] = $module_name;
switch ($type) { switch ($type) {
case 'max': case 'max':
$value = reporting_get_agentmodule_data_max( $value = reporting_get_agentmodule_data_max(
@ -3617,6 +3628,7 @@ function reporting_sql($report, $content) {
$header = array(); $header = array();
if ($content['header_definition'] != '') { if ($content['header_definition'] != '') {
$header = explode('|', $content['header_definition']); $header = explode('|', $content['header_definition']);
$return['header'] = $header;
} }
$result = db_get_all_rows_sql($sql); $result = db_get_all_rows_sql($sql);