fixed error automatic combined graph

This commit is contained in:
daniel 2018-11-08 15:05:57 +01:00
parent 19fc5863d0
commit c4c0cc59d4

View File

@ -6303,19 +6303,28 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
$graph = db_get_row ("tgraph", "id_graph", $content['id_gs']);
$return = array();
$return['type'] = 'custom_graph';
if (empty($content['name'])) {
if($type_report == "custom_graph"){
$content['name'] = __('Custom graph');
} else if($type_report == "automatic_graph"){
$content['name'] = __('Automatic combined graph');
} else {
$content['name'] ='';
}
}
if ($type_report == "custom_graph") {
$graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']);
$id_graph = $content['id_gs'];
}
else if($type_report == "automatic_graph"){
$content['name'] = __('Automatic combined graph');
$graphs[0]["stacked"] = '';
$graphs[0]["summatory_series"] = '';
$graphs[0]["average_series"] = '';
$graphs[0]["modules_series"] = '';
$graphs[0]["fullscale"] = $content['style']['fullscale'];
if(is_array($content['id_agent_module'])){
foreach ($content['id_agent_module'] as $key => $value) {
if($content['each_agent']){
@ -6334,12 +6343,6 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
else {
$content['name'] = __('Simple graph');
}
} else {
if ($type_report == "custom_graph") {
$graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']);
$id_graph = $content['id_gs'];
}
}
$return['title'] = $content['name'];
$return['subtitle'] = io_safe_output($graph['name']);