Added switch to enable NTA

Former-commit-id: 5fc3b47f8f9f92ac643db6a5dbe4fc320ca141f6
This commit is contained in:
Fermin 2019-03-01 13:38:48 +01:00
parent 3eef1b3dbe
commit 3f53541c5e
2 changed files with 16 additions and 0 deletions

View File

@ -125,6 +125,14 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
$table->data[19][1] = html_print_checkbox_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true);
$table->data[21][0] = __('Enable Network Traffic Analyzer');
$table->data[21][1] = html_print_switch(
[
'name' => 'activate_nta',
'value' => $config['activate_nta'],
]
);
$zone_name = [
'Africa' => __('Africa'),

View File

@ -224,6 +224,10 @@ function config_update_config()
$error_update[] = __('Enable Netflow');
}
if (!config_update_value('activate_nta', (bool) get_parameter_switch('activate_nta'))) {
$error_update[] = __('Enable Network Traffic Analyzer');
}
$timezone = (string) get_parameter('timezone');
if ($timezone != '') {
if (!config_update_value('timezone', $timezone)) {
@ -1979,6 +1983,10 @@ function config_process_config()
config_update_value('activate_netflow', 0);
}
if (!isset($config['activate_nta'])) {
config_update_value('activate_nta', 0);
}
if (!isset($config['netflow_path'])) {
if ($is_windows) {
$default = 'C:\\PandoraFMS\\Pandora_Server\\data_in\\netflow';