[Web] Fix symbol options encoding in rspamd item view
[Web] Feature: Allow to view mailq item content via postcat [Web] Fix Rspamd not drawing
This commit is contained in:
@@ -404,7 +404,7 @@ jQuery(function($){
|
||||
function rspamd_pie_graph() {
|
||||
$.ajax({
|
||||
url: '/api/v1/get/rspamd/actions',
|
||||
async: false,
|
||||
async: true,
|
||||
success: function(data){
|
||||
|
||||
var total = 0;
|
||||
@@ -438,17 +438,25 @@ jQuery(function($){
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var chartcanvas = document.getElementById('rspamd_donut');
|
||||
|
||||
Chart.plugins.register('ChartDataLabels');
|
||||
|
||||
var chart = new Chart(chartcanvas.getContext("2d"), {
|
||||
plugins: [ChartDataLabels],
|
||||
type: 'doughnut',
|
||||
data: graphdata,
|
||||
options: options
|
||||
});
|
||||
if(typeof chart == 'undefined') {
|
||||
chart = new Chart(chartcanvas.getContext("2d"), {
|
||||
plugins: [ChartDataLabels],
|
||||
type: 'doughnut',
|
||||
data: graphdata,
|
||||
options: options
|
||||
});
|
||||
}
|
||||
else {
|
||||
chart.destroy();
|
||||
chart = new Chart(chartcanvas.getContext("2d"), {
|
||||
plugins: [ChartDataLabels],
|
||||
type: 'doughnut',
|
||||
data: graphdata,
|
||||
options: options
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -534,7 +542,7 @@ jQuery(function($){
|
||||
}
|
||||
var str = '<strong>' + key + '</strong> ' + sym.score_formatted;
|
||||
if (sym.options) {
|
||||
str += ' [' + sym.options.join(", ") + "]";
|
||||
str += ' [' + escapeHtml(sym.options.join(", ")) + "]";
|
||||
}
|
||||
return str
|
||||
}).join('<br>\n');
|
||||
@@ -703,7 +711,7 @@ jQuery(function($){
|
||||
draw_rspamd_history();
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr("href");
|
||||
if ((target == '#tab-rspamd-history')) {
|
||||
if (target == '#tab-rspamd-history') {
|
||||
rspamd_pie_graph();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user