mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Change file download view.
This commit is contained in:
parent
bb26cba009
commit
64475afc41
@ -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
|
||||
)
|
||||
|
||||
|
@ -161,28 +161,33 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="card-title">Input files</span>
|
||||
<p>
|
||||
{% for file in files %}
|
||||
<a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['path']) }}" class="waves-effect waves-light btn-small">
|
||||
<i class="material-icons left">file_download</i>{{ file }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
{% if job.status == 'complete' %}
|
||||
<p> </p>
|
||||
<span class="card-title">Results</span>
|
||||
<p>
|
||||
{% for file in files %}
|
||||
{% for result in files[file]['results'] %}
|
||||
<a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['results'][result]['path']) }}" class="waves-effect waves-light btn-small">
|
||||
<i class="material-icons left">file_download</i>{{ result }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Inputs</th>
|
||||
<th>Results</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['path']) }}" class="waves-effect waves-light btn-small">{{ file }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if job.status == 'complete' %}
|
||||
{% for result in files[file]['results'] %}
|
||||
<a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['results'][result]['path']) }}" class="waves-effect waves-light btn-small">{{ result }}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user