#11391 Fixed ace editor and log viewer

This commit is contained in:
Daniel Maya 2023-09-13 15:19:42 +02:00
parent a46a43fd89
commit a0dcdb88b0
4 changed files with 33 additions and 4 deletions

View File

@ -1707,6 +1707,14 @@ function config_update_config()
if (config_update_value('Days_purge_old_information', (int) get_parameter('Days_purge_old_information'), true) === false) {
$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');
}
break;
case 'hist_db':
@ -2480,6 +2488,14 @@ function config_process_config()
config_update_value('Days_purge_old_information', 90);
}
if (!isset($config['elasticsearch_user'])) {
config_update_value('elasticsearch_user', '');
}
if (!isset($config['elasticsearch_pass'])) {
config_update_value('elasticsearch_pass', '');
}
if (!isset($config['font_size'])) {
config_update_value('font_size', 8);
}

View File

@ -7303,7 +7303,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);
}

View File

@ -1,5 +1,8 @@
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();
var view = ace.edit("elasticsearch_view");

View File

@ -3,7 +3,7 @@
}
.query_result_editor_container {
width: 30%;
width: 40%;
}
.query_result_editor_container p {
@ -26,7 +26,7 @@
}
.query_result_view_container {
width: 70%;
width: 60%;
margin-left: 30px;
}
@ -51,3 +51,12 @@
margin-top: 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;
}