[Web] Move Rspamd UI settings from debug to "Access" section

[Web] Move Rspamd settings map from debug to "Configuration" section
[Web] Some minor fixes to JS and PHP
[Web] Feature: Allow to set Rspamd settings from web UI (includes 2 presets)
[Web] Add missing primary keys
This commit is contained in:
André
2018-06-23 23:50:22 +02:00
parent 8bb24a9866
commit 02b1226312
10 changed files with 421 additions and 70 deletions

View File

@@ -9,6 +9,16 @@ jQuery(function($){
e.preventDefault();
$('#import_dkim_arrow').toggleClass("animation");
});
$("#rspamd_preset_1").on('click', function(e) {
e.preventDefault();
$("form[data-id=rsetting]").find("#desc").val(lang.rsettings_preset_1);
$("form[data-id=rsetting]").find("#content").val('priority = 10;\nauthenticated = yes;\napply "default" {\n symbols_enabled = ["DKIM_SIGNED", "DYN_RL_CHECK", "HISTORY_SAVE", "MILTER_HEADERS", "ARC_SIGNED"];\n}');
});
$("#rspamd_preset_2").on('click', function(e) {
e.preventDefault();
$("form[data-id=rsetting]").find("#desc").val(lang.rsettings_preset_2);
$("form[data-id=rsetting]").find("#content").val('priority = 10;\nrcpt = "/postmaster@.*/";\nwant_spam = yes;');
});
function draw_domain_admins() {
ft_domainadmins = FooTable.init('#domainadminstable', {
"columns": [
@@ -182,6 +192,9 @@ jQuery(function($){
$(window).load(function(){
initial_width = $("#sidebar-admin").width();
$("#scrollbox").css("width", initial_width);
if (sessionStorage.scrollTop > 70) {
$('#scrollbox').addClass('scrollboxFixed');
}
$(window).bind('scroll', function() {
if ($(window).scrollTop() > 70) {
$('#scrollbox').addClass('scrollboxFixed');