From 7dfc3ab87700c1f45b688874c5fbbad9667eabb6 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Mon, 20 Jul 2020 13:44:57 +0200 Subject: [PATCH] Add metadata view to nalysis interface and result viewer --- web/app/query_results/views.py | 2 + .../static/js/nopaque.CorpusAnalysisClient.js | 2 +- .../templates/corpora/analyse_corpus.html.j2 | 143 +++++++++++++-- .../macros/query_result_macro.html.j2 | 12 +- .../templates/query_results/inspect.html.j2 | 164 +++++++++++++----- 5 files changed, 252 insertions(+), 71 deletions(-) diff --git a/web/app/query_results/views.py b/web/app/query_results/views.py index 78fda741..1f17a873 100644 --- a/web/app/query_results/views.py +++ b/web/app/query_results/views.py @@ -93,6 +93,7 @@ def inspect_query_result(query_result_id): View to inspect one importe result file in a corpus analysis like interface ''' query_result = QueryResult.query.get_or_404(query_result_id) + query_metadata = query_result.query_metadata if not (query_result.creator == current_user or current_user.is_administrator()): abort(403) @@ -117,6 +118,7 @@ def inspect_query_result(query_result_id): display_options_form=display_options_form, inspect_display_options_form=inspect_display_options_form, query_result_file_content=query_result_file_content, + query_metadata=query_metadata, title='Inspect query result') diff --git a/web/app/static/js/nopaque.CorpusAnalysisClient.js b/web/app/static/js/nopaque.CorpusAnalysisClient.js index de550fba..592d61de 100644 --- a/web/app/static/js/nopaque.CorpusAnalysisClient.js +++ b/web/app/static/js/nopaque.CorpusAnalysisClient.js @@ -113,7 +113,7 @@ class CorpusAnalysisClient { } getMetaData() { - // just emits thos to tell the server to gather all meta data infos and send + // just emits this to tell the server to gather all meta data infos and send // those back this.socket.emit("corpus_analysis_get_meta_data", this.corpusId); } diff --git a/web/app/templates/corpora/analyse_corpus.html.j2 b/web/app/templates/corpora/analyse_corpus.html.j2 index fd71febc..5c1aeedf 100644 --- a/web/app/templates/corpora/analyse_corpus.html.j2 +++ b/web/app/templates/corpora/analyse_corpus.html.j2 @@ -248,14 +248,35 @@ {% import "macros/query_result_macro.html.j2" as metadata %} -