Added the return simple graph as data (for CSV reports) and the agent and module name.

(cherry picked from commit b5c98afdce1fe8372662ee62060175d6e9a46075)
This commit is contained in:
mdtrooper 2015-12-28 14:10:44 +01:00
parent 03c8d36de5
commit 7ad716dd55

View File

@ -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;
}