fix: Improve rendering for body hashes views

pull/904/head
Raphaël Vinot 2024-04-02 19:32:48 +02:00
parent 35995630f3
commit 6a159ace2f
1 changed files with 8 additions and 1 deletions

View File

@ -39,13 +39,20 @@
<script type="text/javascript">
new DataTable('#freqHostTable', {
order: [[ 0, "desc" ]],
columnDefs: [{ width: '20%', targets: 0 },
{ width: '80%', targets: 1 }],
});
</script>
<script type="text/javascript">
new DataTable('#bodyHashDetailsTable', {
columnDefs: [{ width: '20%', targets: 0 },
order: [[ 0, "desc" ]],
columnDefs: [{ width: '20%', targets: 0,
render: (data) => {
const date = new Date(data);
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
}
},
{ width: '40%', targets: 1 },
{ width: '40%', targets: 2 }],
});