From c67921a4b418eaf834d2e8ffe8c4dcd75e09c926 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 2 Jul 2024 10:54:12 -0500 Subject: Add URL information to debug information To help with error reporting, as the user to also provide the URL of the error page to help with debugging issues that the user encounters. --- qc_app/__init__.py | 5 ++++- qc_app/templates/rqtl2/rqtl2-job-error.html | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/qc_app/__init__.py b/qc_app/__init__.py index 9907695..3ee8aa0 100644 --- a/qc_app/__init__.py +++ b/qc_app/__init__.py @@ -3,7 +3,7 @@ import os import logging from pathlib import Path -from flask import Flask +from flask import Flask, request from .entry import entrybp from .upload import upload @@ -33,6 +33,9 @@ def create_app(): if "QCAPP_SECRETS" in os.environ: app.config.from_envvar("QCAPP_SECRETS") + # setup jinja2 symbols + app.jinja_env.globals.update(request_url=lambda : request.url) + # setup blueprints app.register_blueprint(base, url_prefix="/") app.register_blueprint(entrybp, url_prefix="/") diff --git a/qc_app/templates/rqtl2/rqtl2-job-error.html b/qc_app/templates/rqtl2/rqtl2-job-error.html index 72a334b..9817518 100644 --- a/qc_app/templates/rqtl2/rqtl2-job-error.html +++ b/qc_app/templates/rqtl2/rqtl2-job-error.html @@ -14,7 +14,13 @@ could be.
If you find that you cannot figure out what the problem is on your own, please contact the team running the system for assistance, providing the - R/qtl2 bundle you uploaded, and a screenshot of this page.
+ following details: +