Skip to content

Commit af2ce16

Browse files
authored
fix #3337 (#3345)
* fix #3337 * fixes after qiita-rc
1 parent 6c77fe4 commit af2ce16

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

qiita_pet/handlers/study_handlers/prep_template.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
#
66
# The full license is in the file LICENSE, distributed with this software.
77
# -----------------------------------------------------------------------------
8-
from os.path import join
8+
from os.path import join, relpath
99

1010
from tornado.web import authenticated
1111
from tornado.escape import url_escape
1212
import pandas as pd
1313

14+
from qiita_core.qiita_settings import qiita_config
1415
from qiita_pet.handlers.util import to_int
1516
from qiita_pet.handlers.base_handlers import BaseHandler
1617
from qiita_db.util import (get_files_from_uploads_folders, get_mountpoint,
@@ -79,6 +80,13 @@ def get(self):
7980
fp = res['creation_job'].parameters.values['sample_sheet']
8081
res['creation_job_filename'] = fp['filename']
8182
res['creation_job_filename_body'] = fp['body']
83+
summary = None
84+
if res['creation_job'].outputs:
85+
summary = relpath(
86+
# [0] is the id, [1] is the filepath
87+
res['creation_job'].outputs['output'].html_summary_fp[1],
88+
qiita_config.base_data_dir)
89+
res['creation_job_artifact_summary'] = summary
8290

8391
self.render('study_ajax/prep_summary.html', **res)
8492

qiita_pet/templates/study_ajax/prep_summary.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ <h4>
435435
<span id="prep-name-span">{{name}}</span> - ID {{prep_id}} ({{data_type}})
436436
{% if user_level in ('admin', 'wet-lab admin') and creation_job is not None %}
437437
<a class="btn btn-default" download="{{creation_job_filename}}" href="data:text/plain;charset=utf-8,{{creation_job_filename_body}}"><span class="glyphicon glyphicon-download-alt"></span> SampleSheet</a>
438+
{% if creation_job_artifact_summary is not None %}
439+
<a class="btn btn-default" target="_blank" href="{% raw qiita_config.portal_dir %}/artifact/html_summary/{{creation_job_artifact_summary}}"><span class="glyphicon glyphicon-download-alt"></span> Creation Job Output</a>
440+
{% end %}
438441
{% end %}
439442
<a class="btn btn-default" data-toggle="modal" data-target="#update-prep-name"><span class="glyphicon glyphicon-pencil"></span> Edit name</a>
440443
<a class="btn btn-default" href="{% raw qiita_config.portal_dir %}/download/{{download_prep_id}}"><span class="glyphicon glyphicon-download-alt"></span> Prep info</a>

0 commit comments

Comments
 (0)