mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
added job inputs/results blueprints
This commit is contained in:
parent
0d1805fb76
commit
6684257bc4
@ -4,4 +4,10 @@ from flask import Blueprint
|
|||||||
bp = Blueprint('jobs', __name__)
|
bp = Blueprint('jobs', __name__)
|
||||||
|
|
||||||
|
|
||||||
from . import routes, inputs, results
|
from . import routes
|
||||||
|
|
||||||
|
from .inputs import bp as inputs_bp
|
||||||
|
bp.register_blueprint(inputs_bp, url_prefix='/<hashid:job_id>/inputs')
|
||||||
|
|
||||||
|
from .results import bp as results_bp
|
||||||
|
bp.register_blueprint(results_bp, url_prefix='/<hashid:job_id>/results')
|
||||||
|
@ -1,2 +1,7 @@
|
|||||||
from .. import bp
|
from flask import Blueprint
|
||||||
|
|
||||||
|
|
||||||
|
bp = Blueprint('inputs', __name__)
|
||||||
|
|
||||||
|
|
||||||
from . import routes
|
from . import routes
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
from flask import abort, send_from_directory
|
from flask import abort, send_from_directory
|
||||||
from flask_login import current_user, login_required
|
from flask_login import current_user, login_required
|
||||||
from app.models import JobInput
|
from app.models import JobInput
|
||||||
from . import bp
|
from . import bp
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/<hashid:job_id>/inputs/<hashid:job_input_id>/download')
|
@bp.route('/<hashid:job_input_id>/download')
|
||||||
@login_required
|
@login_required
|
||||||
def download_job_input(job_id: int, job_input_id: int):
|
def download_job_input(job_id: int, job_input_id: int):
|
||||||
job_input = JobInput.query.filter_by(
|
job_input = JobInput.query.filter_by(
|
||||||
|
@ -1,2 +1,7 @@
|
|||||||
from .. import bp
|
from flask import Blueprint
|
||||||
|
|
||||||
|
|
||||||
|
bp = Blueprint('results', __name__)
|
||||||
|
|
||||||
|
|
||||||
from . import routes
|
from . import routes
|
||||||
|
@ -4,7 +4,7 @@ from app.models import JobResult
|
|||||||
from . import bp
|
from . import bp
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/<hashid:job_id>/results/<hashid:job_result_id>/download')
|
@bp.route('/<hashid:job_result_id>/download')
|
||||||
@login_required
|
@login_required
|
||||||
def download_job_result(job_id: int, job_result_id: int):
|
def download_job_result(job_id: int, job_result_id: int):
|
||||||
job_result = JobResult.query.filter_by(
|
job_result = JobResult.query.filter_by(
|
||||||
|
Loading…
Reference in New Issue
Block a user