Merge branch '2664-No_funcionan_Automatic_Combined_Graphs_en_Metaconsola' into 'develop'

fixed error for each agent report metaconsole

See merge request artica/pandorafms!1706
This commit is contained in:
vgilc 2018-08-20 17:40:39 +02:00
commit 5b03894b19

View File

@ -6291,7 +6291,6 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
$graph = db_get_row ("tgraph", "id_graph", $content['id_gs']); $graph = db_get_row ("tgraph", "id_graph", $content['id_gs']);
$return = array(); $return = array();
$return['type'] = 'custom_graph'; $return['type'] = 'custom_graph';
if (empty($content['name'])) { if (empty($content['name'])) {
if ($type_report == "custom_graph") { if ($type_report == "custom_graph") {
$content['name'] = __('Custom graph'); $content['name'] = __('Custom graph');
@ -6305,7 +6304,12 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
$graphs[0]["average_series"] = ''; $graphs[0]["average_series"] = '';
$graphs[0]["modules_series"] = ''; $graphs[0]["modules_series"] = '';
foreach ($content['id_agent_module'] as $key => $value) { foreach ($content['id_agent_module'] as $key => $value) {
$modules[] = $value['module']; if($content['each_agent']){
$modules[] = $value;
}
else{
$modules[] = $value['module'];
}
} }
$id_graph = 0; $id_graph = 0;
} }