lookyloo/website/web/templates/tree_body_hashes.html

51 lines
1.9 KiB
HTML
Raw Normal View History

<script type="text/javascript">
new DataTable('#bodyHashesTable', {
columnDefs: [{ width: '10%', targets: 0 },
{ width: '10%', targets: 1 },
{ width: '60%', targets: 2 },
{ width: '20%', targets: 3 }],
});
</script>
<table id="bodyHashesTable" class="table table-striped" style="width:100%">
<thead>
<tr>
<th>Captures total</th>
<th>File type</th>
<th>Ressource URL in capture</th>
<th>Hash (sha512)</th>
</tr>
</thead>
<tbody>
{% for body_hash, info in body_hashes.items() %}
{% set icon_info = get_icon(info['node'].generic_type) %}
<tr>
<td>{{ info['total_captures'] }}</td>
<td>
<a href="{{ url_for('get_ressource', tree_uuid=tree_uuid, node_uuid=info['node'].uuid) }}">
<img src="{{ url_for('static', filename=icon_info['icon']) }}" alt="{{ icon_info['tooltip'] }}"
width="21" height="21"
{% if info['node'].generic_type == "image" %}
data-bs-toggle="tooltip" data-bs-placement="left" data-bs-html="true" data-container="#bodyHashesTable"
title='<img class="ressource_preview" src="{{ url_for('get_ressource_preview', tree_uuid=tree_uuid, node_uuid=info['node'].uuid) }}"/> </br>Click to download.'
{% else %}
data-bs-toggle="tooltip" data-bs-placement="left" data-bs-html="true" data-container="#bodyHashesTable"
title="{{icon_info['tooltip']}} <br/>Click to download."
{% endif %}
/>
</a>
</td>
<td><p class="text-break">{{ info['node'].name }}</p></td>
<td>
<span class="d-inline-block text-truncate" style="max-width: 200px;">
<a href="#bodyHashDetailsModal" data-remote="{{ url_for('body_hash_details', body_hash=body_hash) }}"
data-bs-toggle="modal" data-bs-target="#bodyHashDetailsModal" role="button">
{{body_hash}}
</a>
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>