diff --git a/web/app/models.py b/web/app/models.py index a05d0444..24fd7b3a 100644 --- a/web/app/models.py +++ b/web/app/models.py @@ -650,6 +650,7 @@ class QueryResult(db.Model): 'user_id': self.user_id, 'description': self.description, 'filename': self.filename, + 'query_metadata': self.query_metadata, 'title': self.title} def __repr__(self): diff --git a/web/app/static/js/nopaque.lists.js b/web/app/static/js/nopaque.lists.js index ac0b2178..eaf0f2e7 100644 --- a/web/app/static/js/nopaque.lists.js +++ b/web/app/static/js/nopaque.lists.js @@ -117,10 +117,11 @@ RessourceList.dataMapper = { "download-link": `${job_input.job_id}/inputs/${job_input.id}/download`}), // Mapping for imported result entities from corpus analysis. // Shown in imported results table - QueryResult: query_result => ({description: query_result.description, - "download-link": `/query_results/${query_result.id}/download`, + QueryResult: query_result => ({corpus_name: query_result.query_metadata.corpus_name, + description: query_result.description, id: query_result.id, link: `/query_results/${query_result.id}`, + query: query_result.query_metadata.query, title: query_result.title}), result: result => ({query: result.query, match_count: result.match_count, @@ -252,21 +253,22 @@ RessourceList.options = { {name: "download-link", attr: "href"}]}, QueryResult: {item: ` - - book +
+
+ + +
+ + + +
+ send - - -
- - - - - send - - - `, - valueNames: ["description", + + `, + valueNames: ["corpus_name", + "description", + "query", "title", {data: ["id"]}, {name: "link", attr: "href"}]}, diff --git a/web/app/templates/query_results/results.html.j2 b/web/app/templates/query_results/results.html.j2 deleted file mode 100644 index 0577a1c8..00000000 --- a/web/app/templates/query_results/results.html.j2 +++ /dev/null @@ -1,71 +0,0 @@ -{% extends "nopaque.html.j2" %} - -{% set full_width = True %} - -{% block page_content %} - -
-

This is an overview of all your imported results.

-
- -
-
-
-
- search - - -
-
    - - - - - - - - - - - - - - - - - -
    QueryMatch countCorpus nameCorpus creation dateCorpus analysis dateCorpus type{# Actions #}
    - folderNothing here... -

    No results yet imported.

    -
    -
      -
      - -
      -
      - -{# Delete modals #} -{% for result in results %} - -{% endfor %} - - -{% endblock %} diff --git a/web/app/templates/services/corpus_analysis.html.j2 b/web/app/templates/services/corpus_analysis.html.j2 index 156a70ef..ff416fc7 100644 --- a/web/app/templates/services/corpus_analysis.html.j2 +++ b/web/app/templates/services/corpus_analysis.html.j2 @@ -57,11 +57,14 @@ - +
      {# Service #} - Title + Title and
      Description
      + Corpus and
      + Query +
      {# Actions #}