56 lines
1.7 KiB
HTML
56 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block head %}
|
|
<script src="/s/js/csv_download.js"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div style="display:flex; flex-direction: column;">
|
|
<table class="img-table">
|
|
<tr>
|
|
<th class="img-table-heading">Input Image</th>
|
|
<th class="img-table-heading">Output Heatmap</th>
|
|
<th class="img-table-heading">Legend</th>
|
|
</tr>
|
|
<tr>
|
|
{# Original image #}
|
|
<td class="img-table-cell" id="orig-cell">
|
|
<img class="img-out" src="data:image/png;base64,{{ img_orig_b64 }}" alt="original image">
|
|
</td>
|
|
{# Result image #}
|
|
<td class="img-table-cell" id="res-cell">
|
|
<img class="img-out" src="data:image/png;base64,{{ img_res_b64 }}" alt="result image">
|
|
</td>
|
|
{# Legend #}
|
|
<td>
|
|
<table class="legend" id="legend">
|
|
<tr>
|
|
<th class="legend-heading">Color</th>
|
|
<th class="legend-heading">Temperature</th>
|
|
</tr>
|
|
{% for temp, color in legend.items() %}
|
|
<tr>
|
|
<td class="legend-cell"><div style="width:30px;height:20px;background-color:{{ color }};"></div></td>
|
|
<td class="legend-cell">{{ temp }}°C</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
{# Temperature Frequency Plot #}
|
|
<div style="display: flex; flex-direction: row; align-items: center;">
|
|
<strong>Temperature Distribution</strong>
|
|
<button
|
|
style="width: 10rem; height: 2rem; margin-left: 1rem;"
|
|
download="temperature-data.csv" type="text/csv" onclick="saveCsv(`{{csv_data}}`)">Download Data as CSV</button>
|
|
</div>
|
|
{{ freq_plot | safe }}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|