Merge branch 'ent-6496-Bug-en-leyenda-de-la-grafica-del-item-Network-interfaces-de-informes' into 'develop'

fixed legend avg network interfaces

See merge request artica/pandorafms!3537
This commit is contained in:
Daniel Rodriguez 2020-10-29 09:48:49 +01:00
commit a8cadc6d5c
1 changed files with 10 additions and 1 deletions

View File

@ -3752,9 +3752,18 @@ function series_type_graph_array($data, $show_elements_graph)
$name_legend .= ' / ';
$name_legend .= __('Unit ').' ';
$name_legend .= $show_elements_graph['unit'].': ';
} else {
if (isset($show_elements_graph['from_interface']) === true
&& (bool) $show_elements_graph['from_interface'] === true
) {
$label_interfaces = array_flip($show_elements_graph['modules_series']);
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']][$label_interfaces[$value['agent_module_id']]].': ';
} else if (is_array($show_elements_graph['labels'][$value['agent_module_id']]) === true) {
$name_legend = 'Avg: ';
} else {
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].': ';
}
}
} else {
if (strpos($key, 'baseline') !== false) {
if ($value['unit']) {