remove setup resolution graph

This commit is contained in:
daniel 2018-06-13 11:32:03 +02:00
parent ef95d9c68c
commit 7fe88d761e
5 changed files with 15 additions and 15 deletions

View File

@ -620,10 +620,6 @@ $table_chars->data[$row][0] = __('Graph color #10');
$table_chars->data[$row][1] = html_print_input_text ('graph_color10', $config["graph_color10"], '', 8, 8, true);
$row++;
$table_chars->data[$row][0] = __('Graph resolution (1-low, 5-high)');
$table_chars->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"], '', 5, 5, true);
$row++;
$table_chars->data[$row][0] = __('Value to interface graphics');
$table_chars->data[$row][1] = html_print_input_text ('interface_unit', $config["interface_unit"], '', 20, 20, true);
$row++;

View File

@ -456,11 +456,11 @@ function config_update_config () {
if (!config_update_value ('prominent_time', (string) get_parameter ('prominent_time')))
$error_update[] = __('Timestamp or time comparation');
if (!config_update_value ('graph_color1', (string) get_parameter ('graph_color1')))
$error_update[] = __('Graph color (min)');
$error_update[] = __('Graph color #1');
if (!config_update_value ('graph_color2', (string) get_parameter ('graph_color2')))
$error_update[] = __('Graph color (avg)');
$error_update[] = __('Graph color #2');
if (!config_update_value ('graph_color3', (string) get_parameter ('graph_color3')))
$error_update[] = __('Graph color (max)');
$error_update[] = __('Graph color #3');
if (!config_update_value ('graph_color4', (string) get_parameter ('graph_color4')))
$error_update[] = __('Graph color #4');
if (!config_update_value ('graph_color5', (string) get_parameter ('graph_color5')))
@ -475,8 +475,6 @@ function config_update_config () {
$error_update[] = __('Graph color #9');
if (!config_update_value ('graph_color10', (string) get_parameter ('graph_color10')))
$error_update[] = __('Graph color #10');
if (!config_update_value ('graph_res', (int) get_parameter ('graph_res')))
$error_update[] = __('Graphic resolution (1-low, 5-high)');
if (!config_update_value ('interface_unit', (string) get_parameter ('interface_unit', __('Bytes') )))
$error_update[] = __('Value to interface graphics');
if (!config_update_value ('graph_precision', (string) get_parameter ('graph_precision', 1)))

View File

@ -3734,8 +3734,9 @@ function graph_graphic_agentevents ($id_agent, $width, $height, $period = 0, $ho
$data = array ();
$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
//$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
$resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph
$interval = (int) ($period / $resolution);
$date = get_system_time ();
$datelimit = $date - $period;
@ -3841,7 +3842,8 @@ function graph_graphic_moduleevents ($id_agent, $id_module, $width, $height, $pe
$data = array ();
$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
//$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
$resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph
$interval = (int) ($period / $resolution);
$date = get_system_time ();
$datelimit = $date - $period;
@ -4282,10 +4284,12 @@ function graphic_module_events ($id_module, $width, $height, $period = 0, $homeu
global $graphic_type;
$data = array ();
//XXXXXX
$width = 90;
$height = 100;
$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
//$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
$resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph
$interval = (int) ($period / $resolution);
if ($date === false) {
$date = get_system_time ();

View File

@ -434,7 +434,8 @@ function netflow_get_data ($start_date, $end_date, $interval_length, $filter, $a
// Calculate the number of intervals
if ($interval_length <= 0) {
$num_intervals = $config['graph_res'] * 50;
//$num_intervals = $config['graph_res'] * 50;
$num_intervals = 250;
$period = $end_date - $start_date;
$interval_length = (int) ($period / $num_intervals);
}

View File

@ -3953,7 +3953,8 @@ function reporting_get_event_histogram_meta ($width) {
$data = array ();
$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
//$resolution = $config['graph_res'] * ($period * 2 / $width); // Number of "slices" we want in graph
$resolution = 5 * ($period * 2 / $width); // Number of "slices" we want in graph
$interval = (int) ($period / $resolution);
$date = get_system_time ();