aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-07-02 10:54:12 -0500
committerFrederick Muriuki Muriithi2024-07-02 10:54:12 -0500
commitc67921a4b418eaf834d2e8ffe8c4dcd75e09c926 (patch)
tree9acbf52aee06ef780dcd2ce0d2adcc0faee4bed7 /qc_app
parent5568c4ee34d2539af7a6e880861dd90cca9fb78f (diff)
downloadgn-uploader-c67921a4b418eaf834d2e8ffe8c4dcd75e09c926.tar.gz
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.
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/__init__.py5
-rw-r--r--qc_app/templates/rqtl2/rqtl2-job-error.html8
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.</p>
<p>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.</p>
+ following details:
+ <ul>
+ <li>R/qtl2 bundle you uploaded</li>
+ <li>This URL: <strong>{{request_url()}}</strong></li>
+ <li>(maybe) a screenshot of this page</li>
+ </ul>
+ </p>
</div>
<h4>stdout</h4>