fix: Properly enable/disable ordering where it makes sense

pull/1014/head
Raphaël Vinot 2024-12-10 13:16:20 +01:00
parent b20326cf47
commit cddc205d3c
No known key found for this signature in database
GPG Key ID: 32E4E1C133B3792F
5 changed files with 17 additions and 22 deletions

View File

@ -20,7 +20,7 @@
"favicon.ico": "KOmrfwRbOQqhhwSeBkNpMRAxSVMmmLg+2kRMg9iSv7OWjE9spJc7x4MKB4AE/hi0knaV7UBVctAU6XZ7AC72ZA==",
"font.png": "RwoQkj9dT9SLUL2F7cAA16Nat9t2hDb58eQlHF9ThUar829p0INUXG+5XuDaFOC8SsmCZK5vw2f+YAQ6mLC1Qw==",
"generic.css": "Sh/BcxFMLYYaLdCluVt9efGvJ9CF5d+YJ7lkL2M24PRGu8VZHI9lJiUlFObIocjQgwss3Ve2U5cUAE5WiAdpQQ==",
"generic.js": "zalLApmHMQrFs+7aj5UCXHSuqLDr2IgOWgBtzDIRpUsO7JVcg4mxtI3lQNN/RwLvuL/Q5AOkDRMeLFiTtFptCA==",
"generic.js": "jN+7/j+xIMK3ZklELeAU9aG2+wTbJqEbeGK9w6/TPtNhFCxdCIO+9EwE/6Or2xr+wBwq6keeEadr0lwKHdnJ9w==",
"hostname_popup.js": "froqRK2HEphJSU++PkPfEvaztrzH05QwZ4q2wEBAL6JDinpOCZqW9GMMV6oBhpTmyu5zfsz6ZpqrfaB0C0iIwg==",
"html.png": "T7pZrb8MMDsA/JV/51hu+TOglTqlxySuEVY0rpDjTuAEyhzk2v+W4kYrj7vX+Tp3n2d2lvVD08PwhCG62Yfbzg==",
"ifr.png": "rI5YJypmz1QcULRf9UaOYSqV4tPUSxUdLAycoYzCwywt4Pw4eWzBg9SUr769VyIimoiIyJR+aNuoIA4p5WO2fQ==",
@ -33,7 +33,7 @@
"loader.gif": "ZZKD5vLSKBWKeUpa2KI9qheUJ49iTI/UULmVU/AX28fBfH00K3lLc2v5pVJZ4qXG1BbB13LTXzRKKU35H2XfNg==",
"lookyloo.jpeg": "i6wBj8CsIM5YAQLEMQfhs3CNOSKkErF8AMqqM6ZygSwCyQgv9CU8xt94veMZhM/ufBWoz7kAXmR+yywmxsTxug==",
"redirect.png": "PAjzlPV97rEFvH55mG1ZC9wRl98be3yMeX/nENuFkJcds6/AXgSR2ig/QyPULgobSnNgiYieLVWY/oqsgeywrQ==",
"render_tables.js": "IqsJ7pttDuNErMNbreMOceEY3A7u8NIPPjddWKSiGzwKAYNsoKY8Xm7pN/gjJG3ByuTazXC0CuUpHG9Tk+Z0IQ==",
"render_tables.js": "+yQvQ54MoxseE8r3oWvzTrWh2lqQlFwNKnWWxGUgqD8shK1uMr4JE4BYudHpH39NABdOUUZpiJRAzzXWWio3DQ==",
"secure.svg": "H8ni7t0d60nCJDVGuZpuxC+RBy/ipAjWT627D12HlZGg6LUmjSwPTQTUekm3UJupEP7TUkhXyq6WHc5gy7QBjg==",
"stats.css": "/kY943FwWBTne4IIyf7iBROSfbGd82TeBicEXqKkRwawMVRIvM/Pk5MRa7okUyGIxaDjFQGmV/U1vy+PhN6Jbw==",
"stats_graph.js": "S/sMNQK1UMMLD0xQeEa7sq3ce8o6oPxwxGlyKVtaHOODjair86dbBDm7cu6pa/elMRDJT1j09jEFjWp+5GbhTw==",

View File

@ -46,7 +46,7 @@ function render_datetime_with_tz(data) {
DataTable.render.datetime_with_tz = function () {
return function ( data, type, row ) {
if ( type === 'display' ) {
if ( type === 'display' || type === 'filter') {
return render_datetime_with_tz(data);
}
return data;

View File

@ -83,61 +83,59 @@
if (document.getElementById('bodyHashesTable')) {
new DataTable('#bodyHashesTable', {
retrieve: true,
ordering: false,
drawCallback: function (settings) {
newTabClickListener();
$('[data-bs-toggle="tooltip"]').tooltip({html: true});
},
order: [[ 0, "desc" ]],
columns: [{ width: '10%' },
{ width: '10%' }, // Would make sense to order on the file type
{ width: '60%' },
{ width: '20%' }],
{ width: '10%' },
{ width: '60%', orderable: false },
{ width: '20%', orderable: false }],
});
}
if (document.getElementById('faviconsTable')) {
new DataTable('#faviconsTable', {
retrieve: true,
ordering: false,
drawCallback: function (settings) {
newTabClickListener();
downloadFaviconListener();
},
order: [[ 0, "desc" ]],
columns: [{ width: '10%' },
{ width: '40%' },
{ width: '40%' },
{ width: '10%' }],
{ width: '40%', orderable: false },
{ width: '40%', orderable: false },
{ width: '10%', orderable: false }],
});
}
if (document.getElementById('treeHashesTable')) {
new DataTable('#treeHashesTable', {
retrieve: true,
ordering: false,
order: [[ 0, "desc" ]],
drawCallback: function (settings) { newTabClickListener() },
column: [{ width: '20%' },
{ width: '40%' },
{ width: '40%', orderable: false},
{ width: '40%' }],
});
}
if (document.getElementById('hostnamesTable')) {
new DataTable('#hostnamesTable', {
retrieve: true,
ordering: false,
drawCallback: function (settings) {
newTabClickListener();
$('[data-bs-toggle="tooltip"]').tooltip({html: true});
},
order: [[ 0, "desc" ]],
columns: [{ width: '10%' },
{ width: '40%' },
{ width: '50%' }],
{ width: '40%', orderable: false },
{ width: '50%', orderable: false }],
});
}
if (document.getElementById('identifiersTable')) {
new DataTable('#identifiersTable', {
retrieve: true,
ordering: false,
drawCallback: function (settings) { newTabClickListener() },
order: [[ 0, "desc" ]],
columns: [{ width: '20%' },
{ width: '40%' },
{ width: '40%' }],
@ -146,11 +144,10 @@
if (document.getElementById('urlsTable')) {
new DataTable('#urlsTable', {
retrieve: true,
ordering: false,
drawCallback: function (settings) { newTabClickListener() },
order: [[ 0, "desc" ]],
columns: [{ width: '10%' },
{ width: '90%' }],
{ width: '90%', orderable: false }],
initComplete: function (settings, json) {
$('[data-bs-toggle="tooltip"]').tooltip({html: true});
}

View File

@ -13,7 +13,7 @@
{% for body_hash, info in body_hashes.items() %}
<tr>
<td>{{ info['total_captures'] }}</td>
<td>
<td data-order="{{info['node'].generic_type}}">
{{popup_icons_response(info['node'], tree_uuid)}}
</td>
<td>

View File

@ -1,5 +1,3 @@
{% from "macros.html" import popup_icons_response %}
<table id="urlsTable" class="table table-striped" style="width:100%">
<thead>
<tr>