Browse Source

[Web] fix rspamd table on sm devices

FreddleSpl0it 2 years ago
parent
commit
0372a2150d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      data/web/js/site/debug.js

+ 4 - 4
data/web/js/site/debug.js

@@ -829,13 +829,10 @@ jQuery(function($){
       url: '/api/v1/get/rspamd/actions',
       url: '/api/v1/get/rspamd/actions',
       async: true,
       async: true,
       success: function(data){
       success: function(data){
-        console.log(data);
-
         var total = 0;
         var total = 0;
         $(data).map(function(){total += this[1];});
         $(data).map(function(){total += this[1];});
         var labels = $.makeArray($(data).map(function(){return this[0] + ' ' + Math.round(this[1]/total * 100) + '%';}));
         var labels = $.makeArray($(data).map(function(){return this[0] + ' ' + Math.round(this[1]/total * 100) + '%';}));
         var values = $.makeArray($(data).map(function(){return this[1];}));
         var values = $.makeArray($(data).map(function(){return this[1];}));
-        console.log(values);
 
 
         var graphdata = {
         var graphdata = {
           labels: labels,
           labels: labels,
@@ -951,12 +948,15 @@ jQuery(function($){
           title: 'Score',
           title: 'Score',
           data: 'score',
           data: 'score',
           defaultContent: '',
           defaultContent: '',
+          class: 'text-nowrap',
           createdCell: function(td, cellData) {
           createdCell: function(td, cellData) {
             $(td).attr({
             $(td).attr({
               "data-order": cellData.sortBy,
               "data-order": cellData.sortBy,
               "data-sort": cellData.sortBy
               "data-sort": cellData.sortBy
             });
             });
-            $(td).html(cellData.value);
+          },    
+          render: function (data) {
+            return data.value;
           }
           }
         },
         },
         {
         {