Added setup token
This commit is contained in:
parent
e75de8a1a5
commit
6520ad2107
|
@ -276,6 +276,9 @@ $table->data[$i++][1] = html_print_checkbox_switch('event_storm_protection', 1,
|
||||||
$table->data[$i][0] = __('Command Snapshot');
|
$table->data[$i][0] = __('Command Snapshot');
|
||||||
$table->data[$i++][1] = html_print_checkbox_switch('command_snapshot', 1, $config['command_snapshot'], true);
|
$table->data[$i++][1] = html_print_checkbox_switch('command_snapshot', 1, $config['command_snapshot'], true);
|
||||||
|
|
||||||
|
$table->data[$i][0] = __('Change remote config encoding');
|
||||||
|
$table->data[$i++][1] = html_print_checkbox_switch('use_custom_encoding', 1, $config['use_custom_encoding'], true);
|
||||||
|
|
||||||
$table->data[$i][0] = __('Server logs directory');
|
$table->data[$i][0] = __('Server logs directory');
|
||||||
$table->data[$i++][1] = html_print_input_text(
|
$table->data[$i++][1] = html_print_input_text(
|
||||||
'server_log_dir',
|
'server_log_dir',
|
||||||
|
|
|
@ -287,6 +287,10 @@ function config_update_config()
|
||||||
$error_update[] = __('Command Snapshot');
|
$error_update[] = __('Command Snapshot');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!config_update_value('use_custom_encoding', get_parameter('use_custom_encoding', 0))) {
|
||||||
|
$error_update[] = __('Use custom encoding');
|
||||||
|
}
|
||||||
|
|
||||||
if (!config_update_value('server_log_dir', get_parameter('server_log_dir'))) {
|
if (!config_update_value('server_log_dir', get_parameter('server_log_dir'))) {
|
||||||
$error_update[] = __('Server logs directory');
|
$error_update[] = __('Server logs directory');
|
||||||
}
|
}
|
||||||
|
@ -2797,6 +2801,10 @@ function config_process_config()
|
||||||
config_update_value('event_storm_protection', 0);
|
config_update_value('event_storm_protection', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config['use_custom_encoding'])) {
|
||||||
|
config_update_value('use_custom_encoding', 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($config['server_log_dir'])) {
|
if (!isset($config['server_log_dir'])) {
|
||||||
config_update_value('server_log_dir', '');
|
config_update_value('server_log_dir', '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,8 @@ sub pandora_get_sharedconfig ($$) {
|
||||||
|
|
||||||
$pa_config->{"event_storm_protection"} = pandora_get_tconfig_token ($dbh, 'event_storm_protection', 0);
|
$pa_config->{"event_storm_protection"} = pandora_get_tconfig_token ($dbh, 'event_storm_protection', 0);
|
||||||
|
|
||||||
|
$pa_config->{"use_custom_encoding"} = pandora_get_tconfig_token ($dbh, 'use_custom_encoding', 0);
|
||||||
|
|
||||||
if ($pa_config->{'include_agents'} eq '') {
|
if ($pa_config->{'include_agents'} eq '') {
|
||||||
$pa_config->{'include_agents'} = 0;
|
$pa_config->{'include_agents'} = 0;
|
||||||
}
|
}
|
||||||
|
@ -471,6 +473,7 @@ sub pandora_load_config {
|
||||||
$pa_config->{"stats_interval"} = 300;
|
$pa_config->{"stats_interval"} = 300;
|
||||||
$pa_config->{"agentaccess"} = 1;
|
$pa_config->{"agentaccess"} = 1;
|
||||||
$pa_config->{"event_storm_protection"} = 0;
|
$pa_config->{"event_storm_protection"} = 0;
|
||||||
|
$pa_config->{"use_custom_encoding"} = 0;
|
||||||
$pa_config->{"node_metaconsole"} = 0; # > 7.0NG
|
$pa_config->{"node_metaconsole"} = 0; # > 7.0NG
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue