Skip to content

Commit

Permalink
Update indentation in report.html and extract log params into partial
Browse files Browse the repository at this point in the history
  • Loading branch information
Colelyman authored and Snicker7 committed Sep 13, 2022
1 parent 480060c commit 2feadf4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 41 deletions.
72 changes: 31 additions & 41 deletions templates/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,47 +54,37 @@
<div class="col-sm-1"></div>
<div class="col-sm-10">

<div class="jumbotron" style="background:rgba(0,0,0,0.0); padding:0px" >
<div id='jumbotron_content' >

<div class='card text-center mb-2'>
<div class='card-header'>
{% if report_data['report_display_name'] != '' %}
<h5>{{report_data['report_display_name']}}</h5>
{% endif %}
<h5>CRISPResso2 run information</h5>
<ul class="nav nav-tabs justify-content-center card-header-tabs" id="log-tab" role="tablist">
<li class="nav-item">
<button class="nav-link active" id="log_aln-tab" data-bs-toggle="tab" data-bs-target="#log_aln" role="tab" aria-controls="log_aln" aria-selected="true">Alignment statistics</button>
</li>
<li class="nav-item">
<button class="nav-link" id="log_params-tab" data-bs-toggle="tab" data-bs-target="#log_params" role="tab" aria-controls="log_params" aria-selected="false">Run Parameters</button>
</li>
</ul>
</div>
<div class='card-body'>
<div class='tab-content'>
<div class="tab-pane fade show active" id="log_aln" role="tabpanel">
{{report_data['figures']['htmls']['plot_1a']|safe}}
<label class="labelpadding">{{report_data['figures']['captions']['plot_1a']}}</label>
{% for (data_label,data_path) in report_data['figures']['datas']['plot_1a'] %}
<p class="m-0"><small>Data: <a href="{{report_data['crispresso_data_path']}}{{data_path}}">{{data_label}}</a></small></p>
{% endfor %}
</div>
<div class="tab-pane fade text-start" id="log_params" role="tabpanel">
<p>CRISPResso version: {{report_data['run_data']['running_info']['version']}}</p>
<p>Run completed: {{report_data['run_data']['running_info']['end_time_string']}}</p>
<p>Amplicon sequence: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['args']['amplicon_seq']}}</pre></p>
{% if report_data['run_data']['running_info']['args']['guide_seq'] != '' %}
<p>Guide sequence: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['args']['guide_seq']}}</pre></p>
{% endif %}
<p>Command used: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['command_used']}}</pre></p>
<p>Parameters: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['args_string']}}</pre></p>
<p class='text-center m-0'><small><a href="{{report_data['crispresso_data_path']}}{{report_data['run_data']['running_info']['log_filename']}}">Running log</a></small></p>
</div>
</div>
</div>
</div>
<div class="jumbotron" style="background:rgba(0,0,0,0.0); padding:0px" >
<div id='jumbotron_content' >

<div class='card text-center mb-2'>
<div class='card-header'>
{% if report_data['report_display_name'] != '' %}
<h5>{{report_data['report_display_name']}}</h5>
{% endif %}
<h5>CRISPResso2 run information</h5>
<ul class="nav nav-tabs justify-content-center card-header-tabs" id="log-tab" role="tablist">
<li class="nav-item">
<button class="nav-link active" id="log_aln-tab" data-bs-toggle="tab" data-bs-target="#log_aln" role="tab" aria-controls="log_aln" aria-selected="true">Alignment statistics</button>
</li>
<li class="nav-item">
<button class="nav-link" id="log_params-tab" data-bs-toggle="tab" data-bs-target="#log_params" role="tab" aria-controls="log_params" aria-selected="false">Run Parameters</button>
</li>
</ul>
</div>
<div class='card-body'>
<div class='tab-content'>
<div class="tab-pane fade show active" id="log_aln" role="tabpanel">
{{report_data['figures']['htmls']['plot_1a']|safe}}
<label class="labelpadding">{{report_data['figures']['captions']['plot_1a']}}</label>
{% for (data_label,data_path) in report_data['figures']['datas']['plot_1a'] %}
<p class="m-0"><small>Data: <a href="{{report_data['crispresso_data_path']}}{{data_path}}">{{data_label}}</a></small></p>
{% endfor %}
</div>
{{ render_partial('shared/partials/log_params.html', report_data=report_data) }}
</div>
</div>
</div>

<div class='card text-center mb-2'>
<div class='card-header'>
Expand Down
11 changes: 11 additions & 0 deletions templates/shared/partials/log_params.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="tab-pane fade text-start" id="log_params" role="tabpanel">
<p>CRISPResso version: {{report_data['run_data']['running_info']['version']}}</p>
<p>Run completed: {{report_data['run_data']['running_info']['end_time_string']}}</p>
<p>Amplicon sequence: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['args']['amplicon_seq']}}</pre></p>
{% if report_data['run_data']['running_info']['args']['guide_seq'] != '' %}
<p>Guide sequence: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['args']['guide_seq']}}</pre></p>
{% endif %}
<p>Command used: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['command_used']}}</pre></p>
<p>Parameters: <pre class='pre-scrollable'>{{report_data['run_data']['running_info']['args_string']}}</pre></p>
<p class='text-center m-0'><small><a href="{{report_data['crispresso_data_path']}}{{report_data['run_data']['running_info']['log_filename']}}">Running log</a></small></p>
</div>

0 comments on commit 2feadf4

Please sign in to comment.