diff --git a/app/main/views.py b/app/main/views.py index 3fef5a04..efb2b0bd 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -110,8 +110,9 @@ def job(job_id): files[file]['results'] = {} results_dir = os.path.join(dir, 'output', file) for result in os.listdir(results_dir): - files[file]['results'][result] = {} - files[file]['results'][result]['path'] = os.path.join( + result_type = result.rsplit(".", 1)[1] + files[file]['results'][result_type] = {} + files[file]['results'][result_type]['path'] = os.path.join( 'output', files[file]['path'], result ) diff --git a/app/templates/main/jobs/job.html.j2 b/app/templates/main/jobs/job.html.j2 index 014f99bd..a9bfd2b5 100644 --- a/app/templates/main/jobs/job.html.j2 +++ b/app/templates/main/jobs/job.html.j2 @@ -161,28 +161,33 @@ - Input files -
- {% for file in files %} - - file_download{{ file }} - - {% endfor %} -
- - {% if job.status == 'complete' %} -- Results -
- {% for file in files %} - {% for result in files[file]['results'] %} - - file_download{{ result }} - - {% endfor %} - {% endfor %} -
- {% endif %} +Inputs | +Results | +
---|---|
+ {{ file }} + | ++ {% if job.status == 'complete' %} + {% for result in files[file]['results'] %} + {{ result }} + {% endfor %} + {% else %} + None + {% endif %} + | +