Fixed problems with labels in custom graphs when use this type en reports
This commit is contained in:
parent
71a3014ec2
commit
8c08a8c997
|
@ -4335,15 +4335,17 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
||||||
if ($graphs === false)
|
if ($graphs === false)
|
||||||
$graphs = array();
|
$graphs = array();
|
||||||
|
|
||||||
|
$labels = array();
|
||||||
foreach ($graphs as $graph_item) {
|
foreach ($graphs as $graph_item) {
|
||||||
array_push ($modules, $graph_item['id_agent_module']);
|
array_push ($modules, $graph_item['id_agent_module']);
|
||||||
array_push ($weights, $graph_item["weight"]);
|
array_push ($weights, $graph_item["weight"]);
|
||||||
}
|
if (in_array('label',$content['style'])) {
|
||||||
|
$item = array('type' => 'custom_graph',
|
||||||
$labels = array();
|
'id_agent' =>modules_get_agentmodule_agent($graph_item['id_agent_module']),
|
||||||
if (in_array('label',$content['style'])) {
|
'id_agent_module'=>$graph_item['id_agent_module']);
|
||||||
$label = reporting_label_macro($content, $content['style']['label']);
|
$label = reporting_label_macro($item, $content['style']['label']);
|
||||||
$labels = array_fill_keys($modules, $label);
|
$labels[$graph_item['id_agent_module']] = $label;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$return['chart'] = '';
|
$return['chart'] = '';
|
||||||
|
|
Loading…
Reference in New Issue