Merge branch 'ent-7085-11447-No-se-visualizan-nombres-de-modulos-en-graficas-combinadas-en-el-agente' into 'develop'
visual fixes in agent view graphs See merge request artica/pandorafms!3884
This commit is contained in:
commit
2422813a29
|
@ -55,9 +55,15 @@ if ($save_custom_graph) {
|
|||
if ($print_custom_graph) {
|
||||
ob_clean();
|
||||
|
||||
$width_value = (int) get_parameter('width', CHART_DEFAULT_WIDTH);
|
||||
|
||||
if ($width_value === -1) {
|
||||
$width_value = '';
|
||||
}
|
||||
|
||||
$params = [
|
||||
'period' => (int) get_parameter('period', SECONDS_5MINUTES),
|
||||
'width' => (int) get_parameter('width', CHART_DEFAULT_WIDTH),
|
||||
'width' => $width_value,
|
||||
'height' => (int) get_parameter('height', CHART_DEFAULT_HEIGHT),
|
||||
'unit_name' => get_parameter('unit_list', []),
|
||||
'date' => (int) get_parameter('date', time()),
|
||||
|
|
|
@ -3910,6 +3910,18 @@ function series_type_graph_array($data, $show_elements_graph)
|
|||
$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: ';
|
||||
|
||||
if (array_key_exists('agent_alias', $value)
|
||||
&& array_key_exists('module_name', $value)
|
||||
&& array_key_exists('unit', $value)
|
||||
) {
|
||||
$name_legend .= $value['agent_alias'];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= $value['module_name'];
|
||||
$name_legend .= ' / ';
|
||||
$name_legend .= __('Unit ').' ';
|
||||
$name_legend .= $value['unit'].': ';
|
||||
}
|
||||
} else {
|
||||
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].': ';
|
||||
}
|
||||
|
|
|
@ -516,7 +516,7 @@ echo "<div style='width: ".$table->width."; text-align: right;'>";
|
|||
$container.html($errorMessage.html());
|
||||
}
|
||||
|
||||
requestCustomGraph(0, width, height, period, stacked, date, modules)
|
||||
requestCustomGraph(0, -1, height, period, stacked, date, modules)
|
||||
.done(handleSuccess)
|
||||
.fail(handleError);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue