Added a new option to visual setup that configure the interface unit graphs. Ticket#2620
This commit is contained in:
parent
aedd3a0c6b
commit
ba492135ca
|
@ -337,6 +337,10 @@ $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++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Default line thickness for the Custom Graph.');
|
||||
$table_chars->data[$row][1] = html_print_input_text ('custom_graph_width',
|
||||
$config["custom_graph_width"], '', 5, 5, true);
|
||||
|
|
|
@ -419,6 +419,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);
|
||||
|
@ -1296,7 +1298,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");
|
||||
}
|
||||
|
|
|
@ -178,7 +178,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 '</div>';
|
||||
|
|
Loading…
Reference in New Issue