2024-05-14 18:52:26 +02:00
|
|
|
{% from "macros.html" import popup_icons_response %}
|
|
|
|
|
2024-09-04 16:30:33 +02:00
|
|
|
<script type="text/javascript" nonce="{{ csp_nonce() }}">
|
2024-05-14 18:52:26 +02:00
|
|
|
var table = new DataTable('#hostnamesTable', {
|
|
|
|
order: [[ 0, "desc" ]],
|
|
|
|
columnDefs: [{ width: '10%', targets: 0 },
|
|
|
|
{ width: '40%', targets: 1 },
|
|
|
|
{ width: '50%', targets: 2 }],
|
|
|
|
initComplete: function (settings, json) {
|
|
|
|
$('[data-bs-toggle="tooltip"]').tooltip({html: true});
|
|
|
|
}
|
|
|
|
}).on('draw', function() {
|
|
|
|
$('[data-bs-toggle="tooltip"]').tooltip({html: true});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2024-09-04 16:30:33 +02:00
|
|
|
<script type="text/javascript" nonce="{{ csp_nonce() }}">
|
|
|
|
let openNewTabButtons = document.querySelectorAll('.openNewTab');
|
|
|
|
if (openNewTabButtons) {
|
|
|
|
openNewTabButtons.forEach(el => el.addEventListener('click', event => {
|
|
|
|
openTreeInNewTab(el.dataset.capture, el.dataset.hostnode);
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2024-05-14 18:52:26 +02:00
|
|
|
<table id="hostnamesTable" class="table table-striped" style="width:100%">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Number of captures</th>
|
|
|
|
<th>Hostname</th>
|
|
|
|
<th>URLs</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for hostname, info in hostnames.items() %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ info['total_captures'] }}</td>
|
|
|
|
<td>
|
|
|
|
<span class="d-inline-block text-break">
|
|
|
|
<a href="#hostnameDetailsModal" data-remote="{{ url_for('hostname_details', hostname=hostname) }}"
|
|
|
|
data-bs-toggle="modal" data-bs-target="#hostnameDetailsModal" role="button">
|
|
|
|
{{hostname}}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<p class="d-inline-flex gap-1">
|
|
|
|
<button class="btn btn-primary" type="button"
|
|
|
|
data-bs-toggle="collapse" data-bs-target="#collapseAllNodes_{{loop.index}}"
|
|
|
|
aria-expanded="false" aria-controls="collapseAllNodes_{{loop.index}}">
|
|
|
|
Show
|
|
|
|
</button>
|
|
|
|
</p>
|
|
|
|
<div class="collapse" id="collapseAllNodes_{{loop.index}}">
|
|
|
|
<div class="card card-body">
|
|
|
|
<span class="d-inline-block text-break">
|
|
|
|
<ul>
|
|
|
|
{% for node in info['nodes'] %}
|
|
|
|
<li>
|
|
|
|
<p class="text-break">{{ node.name }}</p>
|
2024-09-04 16:30:33 +02:00
|
|
|
<button type="button" class="btn btn-link openNewTab" data-capture="{{tree_uuid}}" data-hostnode="{{node.uuid}}">Show on tree</button>
|
2024-05-14 18:52:26 +02:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
<ul>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|