Fix missing score and scan time Rspamd logs

This commit is contained in:
Tom Udding 2022-12-24 18:18:28 +01:00
parent eefce62f01
commit 136cc2e3ff
No known key found for this signature in database
GPG Key ID: F1377C292CA6E5CD

View File

@ -765,7 +765,14 @@ jQuery(function($){
{ {
title: 'Score', title: 'Score',
data: 'score', data: 'score',
defaultContent: '' defaultContent: '',
createdCell: function(td, cellData) {
$(td).attr({
"data-order": cellData.sortBy,
"data-sort": cellData.sortBy
});
$(td).html(cellData.value);
}
}, },
{ {
title: 'Subject', title: 'Subject',
@ -786,7 +793,14 @@ jQuery(function($){
{ {
title: 'Scan Time', title: 'Scan Time',
data: 'scan_time', data: 'scan_time',
defaultContent: '' defaultContent: '',
createdCell: function(td, cellData) {
$(td).attr({
"data-order": cellData.sortBy,
"data-sort": cellData.sortBy
});
$(td).html(cellData.value);
}
}, },
{ {
title: 'ID', title: 'ID',
@ -843,9 +857,7 @@ jQuery(function($){
scan_time += ' / ' + item.time_virtual.toFixed(3); scan_time += ' / ' + item.time_virtual.toFixed(3);
} }
item.scan_time = { item.scan_time = {
"options": { "sortBy": item.time_real,
"sortValue": item.time_real
},
"value": scan_time "value": scan_time
}; };
if (item.action === 'clean' || item.action === 'no action') { if (item.action === 'clean' || item.action === 'no action') {
@ -864,9 +876,7 @@ jQuery(function($){
score_content = "[ <span class='text-danger'>" + item.score.toFixed(2) + " / " + item.required_score + "</span> ]"; score_content = "[ <span class='text-danger'>" + item.score.toFixed(2) + " / " + item.required_score + "</span> ]";
} }
item.score = { item.score = {
"options": { "sortBy": item.score,
"sortValue": item.score
},
"value": score_content "value": score_content
}; };
if (item.user == null) { if (item.user == null) {