mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Merge branch 'ent-11391-pandora-indexer-cambios-en-el-collector-de-logs' into 'develop'
#11391 Fixed ace editor and log viewer See merge request artica/pandorafms!6461
This commit is contained in:
commit
9aee38aa0b
@ -2099,8 +2099,8 @@ class ConsoleSupervisor
|
|||||||
$this->notify(
|
$this->notify(
|
||||||
[
|
[
|
||||||
'type' => 'NOTIF.EXT.ELASTICSEARCH',
|
'type' => 'NOTIF.EXT.ELASTICSEARCH',
|
||||||
'title' => __('Log collector cannot connect to ElasticSearch'),
|
'title' => __('Log collector cannot connect to OpenSearch'),
|
||||||
'message' => __('ElasticSearch is not available using current configuration.'),
|
'message' => __('OpenSearch is not available using current configuration.'),
|
||||||
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=log',
|
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup§ion=log',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -1676,6 +1676,18 @@ function config_update_config()
|
|||||||
if (config_update_value('Days_purge_old_information', (int) get_parameter('Days_purge_old_information'), true) === false) {
|
if (config_update_value('Days_purge_old_information', (int) get_parameter('Days_purge_old_information'), true) === false) {
|
||||||
$error_update[] = __('Days to purge old information');
|
$error_update[] = __('Days to purge old information');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_update_value('elasticsearch_user', get_parameter('elasticsearch_user'), true) === false) {
|
||||||
|
$error_update[] = __('User ElasticSearch server');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config_update_value('elasticsearch_pass', get_parameter('elasticsearch_pass'), true) === false) {
|
||||||
|
$error_update[] = __('Pass ElasticSearch server');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config_update_value('elasticsearch_https', get_parameter('elasticsearch_https'), true) === false) {
|
||||||
|
$error_update[] = __('Https ElasticSearch server');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'hist_db':
|
case 'hist_db':
|
||||||
@ -2466,7 +2478,19 @@ function config_process_config()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['Days_purge_old_information'])) {
|
if (!isset($config['Days_purge_old_information'])) {
|
||||||
config_update_value('Days_purge_old_information', 90);
|
config_update_value('Days_purge_old_information', 30);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($config['elasticsearch_user'])) {
|
||||||
|
config_update_value('elasticsearch_user', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($config['elasticsearch_pass'])) {
|
||||||
|
config_update_value('elasticsearch_pass', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($config['elasticsearch_https'])) {
|
||||||
|
config_update_value('elasticsearch_https', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['font_size'])) {
|
if (!isset($config['font_size'])) {
|
||||||
|
@ -7304,7 +7304,9 @@ function html_print_select_date_range(
|
|||||||
$date_end='',
|
$date_end='',
|
||||||
$time_end='',
|
$time_end='',
|
||||||
$date_text=SECONDS_1DAY,
|
$date_text=SECONDS_1DAY,
|
||||||
$class='w100p'
|
$class='w100p',
|
||||||
|
$date_format='Y/m/d',
|
||||||
|
$time_format='H:i:s'
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -7326,21 +7328,21 @@ function html_print_select_date_range(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($date_end === '') {
|
if ($date_end === '') {
|
||||||
$date_end = date('Y/m/d');
|
$date_end = date($date_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($date_init === '') {
|
if ($date_init === '') {
|
||||||
$date_init = date('Y/m/d', strtotime($date_end.' -1 days'));
|
$date_init = date($date_format, strtotime($date_end.' -1 days'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_init = date('Y/m/d', strtotime($date_init));
|
$date_init = date($date_format, strtotime($date_init));
|
||||||
|
|
||||||
if ($time_init === '') {
|
if ($time_init === '') {
|
||||||
$time_init = date('H:i:s');
|
$time_init = date($time_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($time_end === '') {
|
if ($time_end === '') {
|
||||||
$time_end = date('H:i:s');
|
$time_end = date($time_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields[SECONDS_1DAY] = __('Last 24hr');
|
$fields[SECONDS_1DAY] = __('Last 24hr');
|
||||||
|
@ -7326,7 +7326,8 @@ function ui_query_result_editor($name='default')
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update']);
|
$execute_button = html_print_submit_button(__('Execute query'), 'execute_query', false, ['icon' => 'update'], true);
|
||||||
|
html_print_action_buttons($execute_button);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
var editor = ace.edit("elasticsearch_editor");
|
var editor = ace.edit("elasticsearch_editor");
|
||||||
editor.setValue(`GET _search \n{\n "query": {\n "match_all": {}\n }\n}`);
|
editor.setValue(`GET _search\n{\n "query": {\n "match_all": {}\n }\n}`);
|
||||||
|
editor.session.setMode("ace/mode/json");
|
||||||
|
editor.setTheme("ace/theme/textmate");
|
||||||
|
editor.session.setUseWorker(false);
|
||||||
editor.clearSelection();
|
editor.clearSelection();
|
||||||
|
|
||||||
var view = ace.edit("elasticsearch_view");
|
var view = ace.edit("elasticsearch_view");
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.query_result_editor_container {
|
.query_result_editor_container {
|
||||||
width: 30%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.query_result_editor_container p {
|
.query_result_editor_container p {
|
||||||
@ -26,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.query_result_view_container {
|
.query_result_view_container {
|
||||||
width: 70%;
|
width: 60%;
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,3 +51,12 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ace_editor,
|
||||||
|
.ace_editor * {
|
||||||
|
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Droid Sans Mono", "Consolas",
|
||||||
|
monospace !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 400 !important;
|
||||||
|
letter-spacing: 0 !important;
|
||||||
|
}
|
||||||
|
@ -776,3 +776,6 @@ netflowserver 0
|
|||||||
# Number of threads for the Pandora FMS Netflow Server (PANDORA FMS ENTERPRISE ONLY).
|
# Number of threads for the Pandora FMS Netflow Server (PANDORA FMS ENTERPRISE ONLY).
|
||||||
netflowserver_threads 1
|
netflowserver_threads 1
|
||||||
|
|
||||||
|
# Enable (1) or disable (0) the verification of SSL certificates (set to 0 when using self-signed certificates).
|
||||||
|
ssl_verify 0
|
||||||
|
|
||||||
|
@ -580,6 +580,8 @@ sub pandora_load_config {
|
|||||||
$pa_config->{"repl_dbuser"} = undef; # 7.0.770
|
$pa_config->{"repl_dbuser"} = undef; # 7.0.770
|
||||||
$pa_config->{"repl_dbpass"} = undef; # 7.0.770
|
$pa_config->{"repl_dbpass"} = undef; # 7.0.770
|
||||||
|
|
||||||
|
$pa_config->{"ssl_verify"} = 0; # 7.0 774
|
||||||
|
|
||||||
# Check for UID0
|
# Check for UID0
|
||||||
if ($pa_config->{"quiet"} != 0){
|
if ($pa_config->{"quiet"} != 0){
|
||||||
if ($> == 0){
|
if ($> == 0){
|
||||||
@ -1391,6 +1393,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^repl_dbpass\s(.*)/i) {
|
elsif ($parametro =~ m/^repl_dbpass\s(.*)/i) {
|
||||||
$pa_config->{'repl_dbpass'} = clean_blank($1);
|
$pa_config->{'repl_dbpass'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^ssl_verify\s+([0-1])/i) {
|
||||||
|
$pa_config->{'ssl_verify'} = clean_blank($1);
|
||||||
|
}
|
||||||
} # end of loop for parameter #
|
} # end of loop for parameter #
|
||||||
|
|
||||||
# The DB host was overridden by pandora_ha.
|
# The DB host was overridden by pandora_ha.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user