add new tocken zoom graph visual styles

This commit is contained in:
daniel 2018-08-03 10:01:04 +02:00
parent 7390905f07
commit 06c436e5bf
5 changed files with 18 additions and 3 deletions

View File

@ -696,6 +696,18 @@ $options_soft_graphs[1] = __('Classic mode');
$table_chars->data[$row][1] = html_print_select($options_soft_graphs, 'type_mode_graph', $config["type_mode_graph"], '', '', 0, true, false, false);
$row++;
$table_chars->data[$row][0] = __('Zoom graphs:');
$options_zoom_graphs = array();
$options_zoom_graphs[1] = 'x1';
$options_zoom_graphs[2] = 'x2';
$options_zoom_graphs[3] = 'x3';
$options_zoom_graphs[4] = 'x4';
$options_zoom_graphs[5] = 'x5';
$table_chars->data[$row][1] = html_print_select($options_zoom_graphs, 'zoom_graph', $config["zoom_graph"], '', '', 0, true, false, false);
$row++;
$table_chars->data[$row][0] = __('Graph image height');
$table_chars->data[$row][1] = html_print_input_text ('graph_image_height', $config['graph_image_height'], '', 20, 20, true);
$row++;

View File

@ -631,6 +631,9 @@ function config_update_config () {
if (!config_update_value ('type_mode_graph', (int) get_parameter('type_mode_graph', 0)))
$error_update[] = __('Default soft graphs');
if (!config_update_value ('zoom_graph', (int) get_parameter('zoom_graph', 0)))
$error_update[] = __('Default zoom graphs');
if (!config_update_value ('graph_image_height', (int) get_parameter('graph_image_height', 0)))
$error_update[] = __('Default height of the chart image');

View File

@ -892,7 +892,7 @@ function grafico_modulo_sparse ($params) {
}
if(!isset($params['zoom'])){
$params['zoom'] = 1;
$params['zoom'] = $config['zoom_graph'];
}
if(!isset($params['type_mode_graph'])){

View File

@ -121,7 +121,7 @@ $interface_traffic_modules = array(
$height = (int) get_parameter("height", 245);
$start_date = (string) get_parameter("start_date", date("Y-m-d"));
$start_time = get_parameter ("start_time", date("H:i:s"));
$zoom = (int) get_parameter ("zoom", 1);
$zoom = (int) get_parameter ("zoom", $config['zoom_graph']);
$baseline = get_parameter ("baseline", 0);
$show_percentil = get_parameter ("show_percentil", 0);
$fullscale = get_parameter("fullscale");

View File

@ -129,7 +129,7 @@ $alias = db_get_value ("alias","tagente","id_agente",$id_agent);
$start_time = get_parameter ("start_time", date("H:i:s"));
$draw_events = get_parameter ("draw_events", 0);
$graph_type = get_parameter ("type", "sparse");
$zoom = get_parameter ("zoom", 1);
$zoom = get_parameter ("zoom", $config['zoom_graph']);
$baseline = get_parameter ("baseline", 0);
$show_events_graph = get_parameter ("show_events_graph", 0);
$show_percentil = get_parameter ("show_percentil", 0);