lookyloo/website/web/templates/ressources.html

61 lines
1.7 KiB
HTML

{% extends "main.html" %}
{% from 'bootstrap5/utils.html' import render_messages %}
{% from 'macros.html' import shorten_string %}
{% from 'macros.html' import get_ressource_button %}
{% from 'macros.html' import context_form %}
{% block title %}Ressources{% endblock %}
{% block scripts %}
{{ super() }}
<script type="text/javascript">
$('#table').DataTable( {
"order": [[ 2, "desc" ]],
"pageLength": 500
});
</script>
<script>
$(document).ready(() => {
$(function () {
$('[data-bs-toggle="tooltip"]').tooltip()
})
});
</script>
{% endblock %}
{% block content %}
<div class="table-responsive">
<table id="table" class="table" style="width:96%">
<thead>
<tr>
<th>SHA 521</th>
<th>Frequency</th>
<th>Number unique domains</th>
<th>Context</th>
<th>Mimetype</th>
<th>Filename</th>
</tr>
</thead>
<tbody>
{% for h, freq, number_domains, context, capture_uuid, urlnode_uuid, hostnode_uuid, filename, mimetype in ressources %}
<tr>
<td>
<a href="{{ url_for('body_hash_details', body_hash=h) }}">{{ shorten_string(h, 10) }}</a></br>
{{ get_ressource_button(capture_uuid, urlnode_uuid, h, 'Download sample', mimetype and mimetype.startswith('image')) }}
</td>
<td>{{ freq }}</td>
<td>{{ number_domains }}</td>
<td> {{ context['type'] }} - {{ context['details'] }}</br>
{{ context_form(capture_uuid, urlnode_uuid, hostnode_uuid, h, 'ressources') }}
</td>
<td>{{ mimetype }}</td>
<td>{{ shorten_string(filename, 10) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}