add percentil dinamic ticket: 4262
This commit is contained in:
parent
0c656edcf8
commit
e9fc39b53b
|
@ -91,7 +91,7 @@ $inventory_modules = array();
|
||||||
$date = null;
|
$date = null;
|
||||||
// Only avg is selected by default for the simple graphs
|
// Only avg is selected by default for the simple graphs
|
||||||
$only_avg = true;
|
$only_avg = true;
|
||||||
$percentil_95 = false;
|
$percentil = false;
|
||||||
$time_compare_overlapped = false;
|
$time_compare_overlapped = false;
|
||||||
|
|
||||||
//Added for events items
|
//Added for events items
|
||||||
|
@ -198,7 +198,7 @@ switch ($action) {
|
||||||
|
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
|
$only_avg = isset($style['only_avg']) ? (bool) $style['only_avg'] : true;
|
||||||
$percentil_95 = isset($style['percentil_95']) ? $style['percentil_95'] : 0;
|
$percentil = isset($style['percentil']) ? $config['percentil'] : 0;
|
||||||
// The break hasn't be forgotten.
|
// The break hasn't be forgotten.
|
||||||
case 'simple_baseline_graph':
|
case 'simple_baseline_graph':
|
||||||
case 'projection_graph':
|
case 'projection_graph':
|
||||||
|
@ -1261,8 +1261,8 @@ You can of course remove the warnings, that's why we include the source and do n
|
||||||
<td><?php html_print_checkbox('only_avg', 1, $only_avg);?></td>
|
<td><?php html_print_checkbox('only_avg', 1, $only_avg);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="row_percentil" style="" class="datos">
|
<tr id="row_percentil" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Percentil 95');?></td>
|
<td style="font-weight:bold;"><?php echo __('Percentil');?></td>
|
||||||
<td><?php html_print_checkbox('percentil_95', 1, $percentil_95);?></td>
|
<td><?php html_print_checkbox('percentil', 1, $percentil);?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="row_exception_condition_value" style="" class="datos">
|
<tr id="row_exception_condition_value" style="" class="datos">
|
||||||
<td style="font-weight:bold;"><?php echo __('Value'); ?></td>
|
<td style="font-weight:bold;"><?php echo __('Value'); ?></td>
|
||||||
|
@ -2531,7 +2531,7 @@ function chooseType() {
|
||||||
case 'simple_graph':
|
case 'simple_graph':
|
||||||
$("#row_time_compare_overlapped").show();
|
$("#row_time_compare_overlapped").show();
|
||||||
$("#row_only_avg").show();
|
$("#row_only_avg").show();
|
||||||
if ($("#checkbox-percentil_95").prop("checked"))
|
if ($("#checkbox-percentil").prop("checked"))
|
||||||
$("#row_percentil").show();
|
$("#row_percentil").show();
|
||||||
// The break hasn't be forgotten, this element
|
// The break hasn't be forgotten, this element
|
||||||
// only should be shown on the simple graphs.
|
// only should be shown on the simple graphs.
|
||||||
|
|
|
@ -1163,7 +1163,7 @@ switch ($action) {
|
||||||
// Warning. We are using this column to hold this value to avoid
|
// Warning. We are using this column to hold this value to avoid
|
||||||
// the modification of the database for compatibility reasons.
|
// the modification of the database for compatibility reasons.
|
||||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
$style['only_avg'] = (int) get_parameter('only_avg');
|
||||||
$style['percentil_95'] = (int) get_parameter('percentil_95');
|
$style['percentil'] = (int) get_parameter('percentil');
|
||||||
if ($label != '')
|
if ($label != '')
|
||||||
$style['label'] = $label;
|
$style['label'] = $label;
|
||||||
else
|
else
|
||||||
|
@ -1493,7 +1493,7 @@ switch ($action) {
|
||||||
// Warning. We are using this column to hold this value to avoid
|
// Warning. We are using this column to hold this value to avoid
|
||||||
// the modification of the database for compatibility reasons.
|
// the modification of the database for compatibility reasons.
|
||||||
$style['only_avg'] = (int) get_parameter('only_avg');
|
$style['only_avg'] = (int) get_parameter('only_avg');
|
||||||
$style['percentil_95'] = (int) get_parameter('percentil_95');
|
$style['percentil'] = (int) get_parameter('percentil');
|
||||||
if ($label != '')
|
if ($label != '')
|
||||||
$style['label'] = $label;
|
$style['label'] = $label;
|
||||||
else
|
else
|
||||||
|
|
|
@ -464,6 +464,11 @@ $table_chars->data[$row][1] .= __('No').' ' .
|
||||||
html_print_radio_button ('only_average', 0, '', $config["only_average"], true);
|
html_print_radio_button ('only_average', 0, '', $config["only_average"], true);
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
|
$table_chars->data[$row][0] = __('Percentil');
|
||||||
|
$table_chars->data[$row][0] .= ui_print_help_tip(__('Allows only show the average in graphs'), true);
|
||||||
|
$table_chars->data[$row][1] = html_print_input_text ('percentil', $config['percentil'], '', 20, 20, true);
|
||||||
|
$row++;
|
||||||
|
|
||||||
echo "<fieldset>";
|
echo "<fieldset>";
|
||||||
echo "<legend>" . __('Charts configuration') . "</legend>";
|
echo "<legend>" . __('Charts configuration') . "</legend>";
|
||||||
html_print_table ($table_chars);
|
html_print_table ($table_chars);
|
||||||
|
|
|
@ -1596,8 +1596,6 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '',
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//html_debug_print($command_str);
|
|
||||||
|
|
||||||
exec($command_str, $output, $rc);
|
exec($command_str, $output, $rc);
|
||||||
|
|
||||||
// Parse the output of snmpwalk
|
// Parse the output of snmpwalk
|
||||||
|
|
|
@ -532,6 +532,8 @@ function config_update_config () {
|
||||||
if (!config_update_value ('click_display', (bool) get_parameter('click_display', false)))
|
if (!config_update_value ('click_display', (bool) get_parameter('click_display', false)))
|
||||||
$error_update[] = __('Display lateral menus with left click');
|
$error_update[] = __('Display lateral menus with left click');
|
||||||
//Daniel maya 02/06/2016 Display menu with click --END
|
//Daniel maya 02/06/2016 Display menu with click --END
|
||||||
|
if (!config_update_value ('percentil', (int) get_parameter('percentil', 0)))
|
||||||
|
$error_update[] = __('Default percentil');
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
|
@ -766,9 +766,8 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
||||||
/*if ($baseline) {
|
/*if ($baseline) {
|
||||||
$legend['baseline'.$series_suffix] = __('Baseline');
|
$legend['baseline'.$series_suffix] = __('Baseline');
|
||||||
}*/
|
}*/
|
||||||
|
//$legend['no_data'.$series_suffix] = __('No data').$series_suffix_str;
|
||||||
$legend['no_data'.$series_suffix] = __('No data').$series_suffix_str;
|
//$chart_extra_data['legend_no_data'] = $legend['no_data'.$series_suffix_str];
|
||||||
$chart_extra_data['legend_no_data'] = $legend['no_data'.$series_suffix_str];
|
|
||||||
|
|
||||||
if ($show_unknown) {
|
if ($show_unknown) {
|
||||||
$legend['unknown'.$series_suffix] = __('Unknown').$series_suffix_str;
|
$legend['unknown'.$series_suffix] = __('Unknown').$series_suffix_str;
|
||||||
|
|
|
@ -5830,7 +5830,7 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
'white',
|
'white',
|
||||||
($content['style']['percentil_95'] == 1) ? 95 : null);
|
($content['style']['percentil'] == 1) ? $config['percentil'] : null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'data':
|
case 'data':
|
||||||
|
|
|
@ -144,7 +144,7 @@ $interface_traffic_modules = array(
|
||||||
$start_date = (string) get_parameter("start_date", date("Y-m-d"));
|
$start_date = (string) get_parameter("start_date", date("Y-m-d"));
|
||||||
$zoom = (int) get_parameter ("zoom", 1);
|
$zoom = (int) get_parameter ("zoom", 1);
|
||||||
$baseline = get_parameter ("baseline", 0);
|
$baseline = get_parameter ("baseline", 0);
|
||||||
$show_percentil_95 = get_parameter ("show_percentil_95", 0);
|
$show_percentil = get_parameter ("show_percentil", 0);
|
||||||
|
|
||||||
if ($zoom > 1) {
|
if ($zoom > 1) {
|
||||||
$height = $height * ($zoom / 2.1);
|
$height = $height * ($zoom / 2.1);
|
||||||
|
@ -187,7 +187,7 @@ $interface_traffic_modules = array(
|
||||||
1,
|
1,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
(($show_percentil_95)? 95 : null),
|
(($show_percentil)? $config['percentil'] : null),
|
||||||
true);
|
true);
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
@ -236,8 +236,8 @@ $interface_traffic_modules = array(
|
||||||
$table->rowclass[] = '';
|
$table->rowclass[] = '';
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Show percentil 95º');
|
$data[0] = __('Show percentil');
|
||||||
$data[1] = html_print_checkbox ("show_percentil_95", 1, (bool) $show_percentil_95, true);
|
$data[1] = html_print_checkbox ("show_percentil", 1, (bool) $show_percentil, true);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] ='';
|
$table->rowclass[] ='';
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ $id = get_parameter('id');
|
||||||
$zoom = get_parameter ("zoom", 1);
|
$zoom = get_parameter ("zoom", 1);
|
||||||
$baseline = get_parameter ("baseline", 0);
|
$baseline = get_parameter ("baseline", 0);
|
||||||
$show_events_graph = get_parameter ("show_events_graph", 0);
|
$show_events_graph = get_parameter ("show_events_graph", 0);
|
||||||
$show_percentil_95 = get_parameter ("show_percentil_95", 0);
|
$show_percentil = get_parameter ("show_percentil", 0);
|
||||||
$time_compare_separated = get_parameter ("time_compare_separated", 0);
|
$time_compare_separated = get_parameter ("time_compare_separated", 0);
|
||||||
$time_compare_overlapped = get_parameter ("time_compare_overlapped", 0);
|
$time_compare_overlapped = get_parameter ("time_compare_overlapped", 0);
|
||||||
$unknown_graph = get_parameter_checkbox ("unknown_graph", 1);
|
$unknown_graph = get_parameter_checkbox ("unknown_graph", 1);
|
||||||
|
@ -221,7 +221,7 @@ $id = get_parameter('id');
|
||||||
false, $urlImage, 1, false,
|
false, $urlImage, 1, false,
|
||||||
'adapter_' . $graph_type, $time_compare,
|
'adapter_' . $graph_type, $time_compare,
|
||||||
$unknown_graph, true, 'white',
|
$unknown_graph, true, 'white',
|
||||||
(($show_percentil_95)? 95 : null));
|
(($show_percentil)? $config['percentil'] : null));
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
if ($show_events_graph)
|
if ($show_events_graph)
|
||||||
echo graphic_module_events($id, $width, $height,
|
echo graphic_module_events($id, $width, $height,
|
||||||
|
@ -369,8 +369,8 @@ $id = get_parameter('id');
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
case 'sparse':
|
case 'sparse':
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = __('Show percentil 95º');
|
$data[0] = __('Show percentil');
|
||||||
$data[1] = html_print_checkbox ("show_percentil_95", 1, (bool) $show_percentil_95, true);
|
$data[1] = html_print_checkbox ("show_percentil", 1, (bool) $show_percentil, true);
|
||||||
$table->data[] = $data;
|
$table->data[] = $data;
|
||||||
$table->rowclass[] ='';
|
$table->rowclass[] ='';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue