From 06c436e5bf9ee5d89e86e861d027d1736fabe287 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 3 Aug 2018 10:01:04 +0200 Subject: [PATCH] add new tocken zoom graph visual styles --- pandora_console/godmode/setup/setup_visuals.php | 12 ++++++++++++ pandora_console/include/functions_config.php | 3 +++ pandora_console/include/functions_graph.php | 2 +- .../agentes/interface_traffic_graph_win.php | 2 +- pandora_console/operation/agentes/stat_win.php | 2 +- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 5d4f0f664a..bdca26e56d 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -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++; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index fcfdf925c8..7fcee364f3 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -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'); diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index cbee30c35f..9af0c620cf 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -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'])){ diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 3273dc4069..94251a380a 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -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"); diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 54bfbe716c..6b98cc931c 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -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);