From 0372a2150d438ad71c1acc853db2a8556486ee82 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Fri, 21 Apr 2023 20:14:43 +0200 Subject: [PATCH 1/2] [Web] fix rspamd table on sm devices --- data/web/js/site/debug.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/web/js/site/debug.js b/data/web/js/site/debug.js index 55b6660b..542ba185 100644 --- a/data/web/js/site/debug.js +++ b/data/web/js/site/debug.js @@ -829,13 +829,10 @@ jQuery(function($){ url: '/api/v1/get/rspamd/actions', async: true, success: function(data){ - console.log(data); - var total = 0; $(data).map(function(){total += this[1];}); var labels = $.makeArray($(data).map(function(){return this[0] + ' ' + Math.round(this[1]/total * 100) + '%';})); var values = $.makeArray($(data).map(function(){return this[1];})); - console.log(values); var graphdata = { labels: labels, @@ -951,12 +948,15 @@ jQuery(function($){ title: 'Score', data: 'score', defaultContent: '', + class: 'text-nowrap', createdCell: function(td, cellData) { $(td).attr({ "data-order": cellData.sortBy, "data-sort": cellData.sortBy }); - $(td).html(cellData.value); + }, + render: function (data) { + return data.value; } }, { From fe4a418af45fd7e82df7facfb9cdfb71efd17fb3 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Thu, 27 Apr 2023 10:45:11 +0200 Subject: [PATCH 2/2] [Web] fix rspamd table scan_time on sm devices --- data/web/js/site/debug.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/web/js/site/debug.js b/data/web/js/site/debug.js index 542ba185..0b42e2c7 100644 --- a/data/web/js/site/debug.js +++ b/data/web/js/site/debug.js @@ -979,7 +979,9 @@ jQuery(function($){ "data-order": cellData.sortBy, "data-sort": cellData.sortBy }); - $(td).html(cellData.value); + }, + render: function (data) { + return data.value; } }, {