From 72ba61f369c0f40291ee429ba3001dd6ce78fa5f Mon Sep 17 00:00:00 2001 From: Patrick Jentsch
This list is not initialized yet.
-This list is not initialized yet.
+No ressource available.
-No ressource available.
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
- arrow_backBack to user administration + arrow_backBack to user administrationDear {{ job.creator.username }},
+Dear {{ job.user.username }},
The status of your Job "{{ job.title }}" has changed!
It is now {{ job.status }}!
diff --git a/app/templates/tasks/email/notification.txt.j2 b/app/templates/tasks/email/notification.txt.j2 index 03012b3e..be746b9c 100644 --- a/app/templates/tasks/email/notification.txt.j2 +++ b/app/templates/tasks/email/notification.txt.j2 @@ -1,4 +1,4 @@ -Dear {{ job.creator.username }}, +Dear {{ job.user.username }}, The status of your Job "{{ job.title }}" has changed! It is now {{ job.status }}! diff --git a/app/utils.py b/app/utils.py new file mode 100644 index 00000000..a320d4bb --- /dev/null +++ b/app/utils.py @@ -0,0 +1,10 @@ +from app import hashids +from werkzeug.routing import BaseConverter + + +class HashidConverter(BaseConverter): + def to_python(self, value): + return hashids.decode(value)[0] + + def to_url(self, value): + return hashids.encode(value) diff --git a/config.py b/config.py index 06c48173..79f7f9b6 100644 --- a/config.py +++ b/config.py @@ -45,7 +45,7 @@ class Config: NOPAQUE_ADMIN = os.environ.get('NOPAQUE_ADMIN') NOPAQUE_DAEMON_ENABLED = \ os.environ.get('NOPAQUE_DAEMON_ENABLED', 'true').lower() == 'true' - NOPAQUE_DATA_DIR = os.environ.get('NOPAQUE_DATA_DIR', '/mnt/nopaque') + NOPAQUE_DATA_DIR = os.path.abspath(os.environ.get('NOPAQUE_DATA_DIR')) NOPAQUE_DOCKER_REGISTRY = 'gitlab.ub.uni-bielefeld.de:4567' NOPAQUE_DOCKER_IMAGE_PREFIX = f'{NOPAQUE_DOCKER_REGISTRY}/sfb1288inf/' NOPAQUE_DOCKER_REGISTRY_USERNAME = \ diff --git a/migrations/versions/68ed092ffe5e_.py b/migrations/versions/68ed092ffe5e_.py new file mode 100644 index 00000000..bbd8b967 --- /dev/null +++ b/migrations/versions/68ed092ffe5e_.py @@ -0,0 +1,50 @@ +"""empty message + +Revision ID: 68ed092ffe5e +Revises: be010d5d708d +Create Date: 2021-11-24 15:33:16.258600 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '68ed092ffe5e' +down_revision = 'be010d5d708d' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.add_column('corpus_files', sa.Column('creation_date', sa.DateTime(), nullable=True)) + op.add_column('corpus_files', sa.Column('last_edited_date', sa.DateTime(), nullable=True)) + op.add_column('corpus_files', sa.Column('mimetype', sa.String(length=255), nullable=True)) + op.add_column('job_inputs', sa.Column('creation_date', sa.DateTime(), nullable=True)) + op.add_column('job_inputs', sa.Column('last_edited_date', sa.DateTime(), nullable=True)) + op.add_column('job_inputs', sa.Column('mimetype', sa.String(length=255), nullable=True)) + op.add_column('job_results', sa.Column('creation_date', sa.DateTime(), nullable=True)) + op.add_column('job_results', sa.Column('last_edited_date', sa.DateTime(), nullable=True)) + op.add_column('job_results', sa.Column('mimetype', sa.String(length=255), nullable=True)) + op.add_column('query_results', sa.Column('creation_date', sa.DateTime(), nullable=True)) + op.add_column('query_results', sa.Column('last_edited_date', sa.DateTime(), nullable=True)) + op.add_column('query_results', sa.Column('mimetype', sa.String(length=255), nullable=True)) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column('query_results', 'mimetype') + op.drop_column('query_results', 'last_edited_date') + op.drop_column('query_results', 'creation_date') + op.drop_column('job_results', 'mimetype') + op.drop_column('job_results', 'last_edited_date') + op.drop_column('job_results', 'creation_date') + op.drop_column('job_inputs', 'mimetype') + op.drop_column('job_inputs', 'last_edited_date') + op.drop_column('job_inputs', 'creation_date') + op.drop_column('corpus_files', 'mimetype') + op.drop_column('corpus_files', 'last_edited_date') + op.drop_column('corpus_files', 'creation_date') + # ### end Alembic commands ### diff --git a/requirements.txt b/requirements.txt index f1afb44a..fbff2916 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,6 +13,7 @@ Flask-SocketIO~=5.1 Flask-SQLAlchemy Flask-WTF gunicorn +hashids hiredis jsonpatch jsonschema