diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index df7e000f39..f9e96cdb5f 100644 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -127,6 +127,11 @@ $table->data[$row][1] = html_print_input_text ('graph_res', $config["graph_res"] $row++; +$table->data[$row][0] = __('Value to interface graphics'); +$table->data[$row][1] = html_print_input_text ('interface_unit', $config["interface_unit"], '', 20, 20, true); + +$row++; + $table->data[$row][0] = __('Interval values'); $units = array( diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 67ffb15fda..7b79f1356f 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -412,6 +412,8 @@ function config_update_config () { $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'); $style = (string) get_parameter ('style'); if ($style != $config['style']) $style = substr ($style, 0, strlen ($style) - 4); @@ -1216,7 +1218,11 @@ function config_process_config () { if (!isset($config['gis_label'])) { config_update_value ('gis_label', 0); } - + + if (!isset($config['interface_unit'])) { + config_update_value ('interface_unit', __('Bytes')); + } + if (!isset($config['gis_default_icon'])) { config_update_value ('gis_default_icon', "marker"); } diff --git a/pandora_console/operation/agentes/interface_traffic_graph_win.php b/pandora_console/operation/agentes/interface_traffic_graph_win.php index 8c4422f83c..785cab697a 100644 --- a/pandora_console/operation/agentes/interface_traffic_graph_win.php +++ b/pandora_console/operation/agentes/interface_traffic_graph_win.php @@ -167,7 +167,7 @@ $interface_traffic_modules = array( array_values($interface_traffic_modules), $config['homeurl'], array_keys($interface_traffic_modules), - array_fill(0, count($interface_traffic_modules),"bytes"), + array_fill(0, count($interface_traffic_modules), $config["interface_unit"]), false); echo '';