fixed error percentil label
This commit is contained in:
parent
c20fcd6366
commit
84d1979c9e
|
@ -3789,11 +3789,20 @@ function series_type_graph_array($data, $show_elements_graph)
|
||||||
} else if (strpos($key, 'percentil') !== false) {
|
} else if (strpos($key, 'percentil') !== false) {
|
||||||
$data_return['series_type'][$key] = 'percentil';
|
$data_return['series_type'][$key] = 'percentil';
|
||||||
if ($show_elements_graph['percentil']) {
|
if ($show_elements_graph['percentil']) {
|
||||||
$data_return['legend'][$key] = __('Percentil').' '.$config['percentil'].'º '.__('of module').' ';
|
|
||||||
if ($show_elements_graph['unit']) {
|
if ($show_elements_graph['unit']) {
|
||||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
$name_legend = __('Percentil').' ';
|
||||||
|
$name_legend .= $config['percentil'].'º ';
|
||||||
|
$name_legend .= __('of module').' ';
|
||||||
|
$name_legend .= $value['agent_alias'].' / ';
|
||||||
|
$name_legend .= $value['module_name'].' / ';
|
||||||
|
$name_legend .= __('Unit ').' ';
|
||||||
|
$name_legend .= $show_elements_graph['unit'].': ';
|
||||||
} else {
|
} else {
|
||||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': ';
|
$name_legend = __('Percentil').' ';
|
||||||
|
$name_legend .= $config['percentil'].'º ';
|
||||||
|
$name_legend .= __('of module').' ';
|
||||||
|
$name_legend .= $value['agent_alias'].' / ';
|
||||||
|
$name_legend .= $value['module_name'].': ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$data_return['legend'][$key] .= $name_legend;
|
$data_return['legend'][$key] .= $name_legend;
|
||||||
|
|
|
@ -2639,6 +2639,10 @@ function config_process_config()
|
||||||
config_update_value('zoom_graph', 1);
|
config_update_value('zoom_graph', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['percentil'])) {
|
||||||
|
config_update_value('percentil', 95);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($config['render_proc_ok'])) {
|
if (!isset($config['render_proc_ok'])) {
|
||||||
config_update_value('render_proc_ok', __('Ok'));
|
config_update_value('render_proc_ok', __('Ok'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,6 +302,15 @@ function grafico_modulo_sparse_data(
|
||||||
$array_data['sum'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
|
$array_data['sum'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
|
||||||
$array_data['sum'.$series_suffix]['unit'] = $data_module_graph['unit'];
|
$array_data['sum'.$series_suffix]['unit'] = $data_module_graph['unit'];
|
||||||
|
|
||||||
|
if ($params['percentil']) {
|
||||||
|
$array_data['percentil'.$series_suffix]['agent_module_id'] = $agent_module_id;
|
||||||
|
$array_data['percentil'.$series_suffix]['id_module_type'] = $data_module_graph['id_module_type'];
|
||||||
|
$array_data['percentil'.$series_suffix]['agent_name'] = $data_module_graph['agent_name'];
|
||||||
|
$array_data['percentil'.$series_suffix]['module_name'] = $data_module_graph['module_name'];
|
||||||
|
$array_data['percentil'.$series_suffix]['agent_alias'] = $data_module_graph['agent_alias'];
|
||||||
|
$array_data['percentil'.$series_suffix]['unit'] = $data_module_graph['unit'];
|
||||||
|
}
|
||||||
|
|
||||||
// This is for a specific type of report that consists in passing
|
// This is for a specific type of report that consists in passing
|
||||||
// an interval and doing the average sum and avg.
|
// an interval and doing the average sum and avg.
|
||||||
if ($params['force_interval'] != '') {
|
if ($params['force_interval'] != '') {
|
||||||
|
@ -378,12 +387,6 @@ function grafico_modulo_sparse_data(
|
||||||
$array_data['sum1']['data'] = $acum_array_data;
|
$array_data['sum1']['data'] = $acum_array_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['percentil']) {
|
|
||||||
$percentil_value = $array_data['percentil'.$series_suffix]['data'][0][1];
|
|
||||||
} else {
|
|
||||||
$percentil_value = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$events = [];
|
$events = [];
|
||||||
if (isset($array_data['sum'.$series_suffix]['max'])) {
|
if (isset($array_data['sum'.$series_suffix]['max'])) {
|
||||||
$max = $array_data['sum'.$series_suffix]['max'];
|
$max = $array_data['sum'.$series_suffix]['max'];
|
||||||
|
@ -1471,8 +1474,6 @@ function graphic_combined_module(
|
||||||
$min = $array_data['sum'.$i]['min'];
|
$min = $array_data['sum'.$i]['min'];
|
||||||
$avg = $array_data['sum'.$i]['avg'];
|
$avg = $array_data['sum'.$i]['avg'];
|
||||||
|
|
||||||
$percentil_value = $array_data['percentil'.$i]['data'][0][1];
|
|
||||||
|
|
||||||
if ($config['fixed_graph'] == false) {
|
if ($config['fixed_graph'] == false) {
|
||||||
$water_mark = [
|
$water_mark = [
|
||||||
'file' => $config['homedir'].'/images/logo_vertical_water.png',
|
'file' => $config['homedir'].'/images/logo_vertical_water.png',
|
||||||
|
|
Loading…
Reference in New Issue