From a288ce2ec3cc540d182c46427a7936acefe580ff Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Tue, 5 Nov 2019 14:06:36 +0100 Subject: [PATCH 1/3] Add merge_corpus_files to compose file for dev process --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 974c0dff..35a95b66 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,7 @@ services: - storage:/mnt/opaque - ./logs:/home/opaque_daemon/logs - ../opaque_daemon/opaque_daemon.py:/home/opaque_daemon/opaque_daemon.py - - ../opaque_daemon/merge_corpus_files.py:/home/merge_corpus_files.py + - ../opaque_daemon/merge_corpus_files.py:/home/opaque_daemon/merge_corpus_files.py - ../opaque_daemon/config.ini:/home/opaque_daemon/config.ini - ../opaque_daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh - $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json From f2024be050a41f2421770faa6bef351ba50d5d32 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Tue, 5 Nov 2019 14:23:45 +0100 Subject: [PATCH 2/3] Add back button --- app/corpora/views.py | 3 ++- app/templates/corpora/corpus_analysis.html.j2 | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/corpora/views.py b/app/corpora/views.py index e6c82d77..20c18e5f 100644 --- a/app/corpora/views.py +++ b/app/corpora/views.py @@ -74,7 +74,8 @@ def corpus_analysis(corpus_id): return redirect(url_for('corpora.corpus_analysis', corpus_id=corpus_id, query=query, hits_per_page=hits_per_page, context=context)) - return render_template('corpora/corpus_analysis.html.j2', corpus=corpus, + return render_template('corpora/corpus_analysis.html.j2', + corpus_id=corpus_id, form=form, dl_form=dl_form, title='Corpus: {}'.format(corpus.title)) diff --git a/app/templates/corpora/corpus_analysis.html.j2 b/app/templates/corpora/corpus_analysis.html.j2 index 6a88bc71..bd2eb46e 100644 --- a/app/templates/corpora/corpus_analysis.html.j2 +++ b/app/templates/corpora/corpus_analysis.html.j2 @@ -1,7 +1,9 @@ {% extends "full_width.html.j2" %} {% block page_content %} +
+ arrow_backBack to corpus overview
From d04f90dee82f1f3c610eac5ea40ec9369b87d35b Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Tue, 5 Nov 2019 15:22:25 +0100 Subject: [PATCH 3/3] Add live colors to corpu sstatus --- app/static/js/CorpusList.js | 5 +++++ app/static/js/JobList.js | 10 +++++++--- app/templates/corpora/corpus.html.j2 | 11 ++++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/static/js/CorpusList.js b/app/static/js/CorpusList.js index dc8fdfa4..5c52edf3 100644 --- a/app/static/js/CorpusList.js +++ b/app/static/js/CorpusList.js @@ -79,3 +79,8 @@ class CorpusList extends List { ); } } +CorpusList.STATUS_COLORS = {"unprepared": "grey", + "preparable": "orange", + "preparing": "yellow", + "prepared": "green", + "default": "red"}; diff --git a/app/static/js/JobList.js b/app/static/js/JobList.js index fdcaddb7..a398c23b 100644 --- a/app/static/js/JobList.js +++ b/app/static/js/JobList.js @@ -113,7 +113,11 @@ JobList.SERVICE_COLORS = {"nlp": "blue", JobList.SERVICE_ICONS = {"nlp": "format_textdirection_l_to_r", "ocr": "find_in_page", "default": "help"}; -JobList.STATUS_COLORS = {"pending": "amber", - "running": "indigo", - "complete": "teal", +JobList.STATUS_COLORS = {"submitted": "blue", + "preparing": "light-blue", + "pending": "orange", + "running": "amber", + "complete": "green", + "stopping": "orange", + "removing": "deep-orange", "default": "red"}; diff --git a/app/templates/corpora/corpus.html.j2 b/app/templates/corpora/corpus.html.j2 index 89a2d49b..74ee82b5 100644 --- a/app/templates/corpora/corpus.html.j2 +++ b/app/templates/corpora/corpus.html.j2 @@ -1,10 +1,19 @@ {% extends "limited_width.html.j2" %} {% block page_content %} +

{{ corpus.title }}

{{ corpus.description }}

- {{ corpus.status }} + {{ corpus.status }}