Unified default netflow interval and deleted from console setup

This commit is contained in:
Calvo 2023-03-17 10:58:58 +01:00
parent 6b14fc0205
commit 284e20fc8a
3 changed files with 5 additions and 17 deletions

View File

@ -46,12 +46,8 @@ $table->data[0][] = html_print_label_input_block(
html_print_input_text('netflow_path', $config['netflow_path'], false, 50, 200, true)
);
$table->data[0][] = html_print_label_input_block(
__('Daemon interval'),
html_print_input_text('netflow_interval', $config['netflow_interval'], false, 50, 200, true)
);
$table->data[1][] = html_print_label_input_block(
$table->data[0][] = html_print_label_input_block(
__('Daemon binary path'),
html_print_input_text('netflow_daemon', $config['netflow_daemon'], false, 50, 200, true)
);
@ -61,7 +57,7 @@ $table->data[1][] = html_print_label_input_block(
html_print_input_text('netflow_nfdump', $config['netflow_nfdump'], false, 50, 200, true)
);
$table->data[2][] = html_print_label_input_block(
$table->data[1][] = html_print_label_input_block(
__('Nfexpire binary path'),
html_print_input_text('netflow_nfexpire', $config['netflow_nfexpire'], false, 50, 200, true)
);
@ -71,7 +67,7 @@ $table->data[2][] = html_print_label_input_block(
html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true)
);
$table->data[3][] = html_print_label_input_block(
$table->data[2][] = html_print_label_input_block(
__('Disable custom live view filters'),
html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true)
);
@ -82,7 +78,7 @@ $table->data[3][] = html_print_label_input_block(
);
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
$table->data[4][] = html_print_label_input_block(
$table->data[3][] = html_print_label_input_block(
__('Name resolution for IP address'),
html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true)
);

View File

@ -1505,10 +1505,6 @@ function config_update_config()
$error_update[] = __('Data storage path');
}
if (config_update_value('netflow_interval', (int) get_parameter('netflow_interval'), true) === false) {
$error_update[] = __('Daemon interval');
}
if (config_update_value('netflow_daemon', get_parameter('netflow_daemon'), true) === false) {
$error_update[] = __('Daemon binary path');
}
@ -2778,10 +2774,6 @@ function config_process_config()
config_update_value('netflow_path', $default);
}
if (!isset($config['netflow_interval'])) {
config_update_value('netflow_interval', SECONDS_10MINUTES);
}
if (!isset($config['netflow_daemon'])) {
config_update_value('netflow_daemon', '/usr/bin/nfcapd');
}

View File

@ -141,7 +141,7 @@ sub pandora_get_sharedconfig ($$) {
# Netflow configuration options
$pa_config->{"activate_netflow"} = pandora_get_tconfig_token ($dbh, 'activate_netflow', 0);
$pa_config->{"netflow_path"} = pandora_get_tconfig_token ($dbh, 'netflow_path', '/var/spool/pandora/data_in/netflow');
$pa_config->{"netflow_interval"} = pandora_get_tconfig_token ($dbh, 'netflow_interval', 300);
$pa_config->{"netflow_interval"} = pandora_get_tconfig_token ($dbh, 'netflow_interval', 3600);
$pa_config->{"netflow_daemon"} = pandora_get_tconfig_token ($dbh, 'netflow_daemon', '/usr/bin/nfcapd');
# Log module configuration