diff --git a/app/corpora/events.py b/app/corpora/events.py index 226e8a5b..4cf2c583 100644 --- a/app/corpora/events.py +++ b/app/corpora/events.py @@ -45,7 +45,7 @@ def corpus_analysis(message): # Prepare and execute a query corpus_name = 'CORPUS' query = str(message['query']) - result_len = 500 + result_len = 100 context_len = int(message['context']) result_offset = 0 client.select_corpus(corpus_name) @@ -55,12 +55,13 @@ def corpus_analysis(message): logger.warning(e) socketio.emit('corpus_analysis', str(e), room=request.sid) else: + logger.warning('====== Initial query {} ======'.format(query)) results = client.show_query_results(result_len=result_len, context_len=context_len, result_offset=result_offset) result_offset += result_len # initial offfset is plus result len because client.show_query_results has been already executed once while result_offset < client.total_nr_matches: - logger.warning('===While loop start.===') + logger.warning('====== While loop start for {} ======'.format(query)) logger.warning('result_offset: {}'.format(result_offset)) results_append = client.show_query_results(result_len=result_len, context_len=context_len, diff --git a/app/corpora/forms.py b/app/corpora/forms.py index 2612cf9f..52bbb36a 100644 --- a/app/corpora/forms.py +++ b/app/corpora/forms.py @@ -81,5 +81,6 @@ class QueryDownloadForm(FlaskForm): choices=[('', 'Choose file type'), ('csv', 'csv'), ('json', 'json'), - ('excel', 'excel')], + ('excel', 'excel'), + ('html', 'html-table')], validators=[DataRequired()]) diff --git a/app/static/css/nopaque.css b/app/static/css/nopaque.css index b62b7e7e..1efba483 100644 --- a/app/static/css/nopaque.css +++ b/app/static/css/nopaque.css @@ -28,7 +28,7 @@ main { padding-left: 300px; } - .modal { + .modal:not(.bottom-sheet) { left: 300px; } diff --git a/app/templates/corpora/analyse_corpus.html.j2 b/app/templates/corpora/analyse_corpus.html.j2 index 9b20440c..90c13046 100644 --- a/app/templates/corpora/analyse_corpus.html.j2 +++ b/app/templates/corpora/analyse_corpus.html.j2 @@ -38,113 +38,133 @@