"func-names": "off",
// "func-style": ["error", "declaration"],
"id-length": ["error", { "min": 1 }],
- // "@stylistic/key-spacing": ["error", {
- // "singleLine": { "afterColon": false }
- // }],
"line-comment-position": "off",
"logical-assignment-operators": ["error", "never"],
"max-params": ["warn", 6],
"sort-vars": "off",
"@stylistic/function-paren-newline": "off",
- "@stylistic/key-spacing": "off",
"@stylistic/one-var-declaration-per-line": "off"
}
}
enabled: true
},
columns: [
- {name:"label", title:"Action"},
- {name:"value", title:"Messages", defaultContent:""},
- {name:"min", title:"Minimum, <span class=\"unit\">" + unit + "</span>", defaultContent:""},
- {name:"avg", title:"Average, <span class=\"unit\">" + unit + "</span>", defaultContent:""},
- {name:"max", title:"Maximum, <span class=\"unit\">" + unit + "</span>", defaultContent:""},
- {name:"last", title:"Last, " + unit},
+ {name: "label", title: "Action"},
+ {name: "value", title: "Messages", defaultContent: ""},
+ {name: "min", title: "Minimum, <span class=\"unit\">" + unit + "</span>", defaultContent: ""},
+ {name: "avg", title: "Average, <span class=\"unit\">" + unit + "</span>", defaultContent: ""},
+ {name: "max", title: "Maximum, <span class=\"unit\">" + unit + "</span>", defaultContent: ""},
+ {name: "last", title: "Last, " + unit},
],
rows: rows.map(function (curr, i) {
return {
}
function updateWidgets(data) {
- let rrd_summary = {rows:[]};
+ let rrd_summary = {rows: []};
let unit = "msg/s";
if (data) {
complete: function () { $("#refresh").removeAttr("disabled").removeClass("disabled"); },
errorMessage: "Cannot receive throughput data",
errorOnceId: "alerted_graph_",
- data: {type:type}
+ data: {type: type}
});
};
items.push(item);
});
- return {items:items};
+ return {items: items};
}
function columns_v2() {
function initErrorsTable(rows) {
rspamd.tables.errors = FooTable.init("#errorsLog", {
columns: [
- {
- sorted: true,
+ {sorted: true,
direction: "DESC",
name: "ts",
title: "Time",
style: {"font-size": "11px", "width": 300, "maxWidth": 300},
- sortValue: function (val) { return Number(val.options.sortValue); }
- },
- {name:"type",
- title:"Worker type",
- breakpoints:"xs sm",
- style:{"font-size":"11px", "width":150, "maxWidth":150}},
- {name:"pid", title:"PID", breakpoints:"xs sm", style:{"font-size":"11px", "width":110, "maxWidth":110}},
- {name:"module", title:"Module", style:{"font-size":"11px"}},
- {name:"id", title:"Internal ID", style:{"font-size":"11px"}},
- {name:"message", title:"Message", breakpoints:"xs sm", style:{"font-size":"11px"}},
+ sortValue: function (val) { return Number(val.options.sortValue); }},
+ {name: "type",
+ title: "Worker type",
+ breakpoints: "xs sm",
+ style: {"font-size": "11px", "width": 150, "maxWidth": 150}},
+ {name: "pid",
+ title: "PID",
+ breakpoints: "xs sm",
+ style: {"font-size": "11px", "width": 110, "maxWidth": 110}},
+ {name: "module", title: "Module", style: {"font-size": "11px"}},
+ {name: "id", title: "Internal ID", style: {"font-size": "11px"}},
+ {name: "message", title: "Message", breakpoints: "xs sm", style: {"font-size": "11px"}},
],
rows: rows,
paging: {
$("#preloader").addClass("d-none");
$("#navBar, #mainUI").removeClass("d-none");
- $(".nav-tabs-sticky").stickyTabs({initialTab:"#status_nav"});
+ $(".nav-tabs-sticky").stickyTabs({initialTab: "#status_nav"});
},
errorMessage: "Cannot get server status",
server: "All SERVERS"
const req_params = {
jsonp: false,
data: o.data,
- headers: $.extend({Password:getPassword()}, o.headers),
+ headers: $.extend({Password: getPassword()}, o.headers),
url: neighbours_status[ind].url + req_url,
xhr: function () {
const xhr = $.ajaxSettings.xhr();
full += item.rcpt_mime.join(", ");
shrt += item.rcpt_mime.slice(0, rcpt_lim).join(",​") + more("rcpt_mime");
}
- return {full:full, shrt:shrt};
+ return {full: full, shrt: shrt};
}
function get_symbol_class(name, score) {
items.push(item);
});
- return {items:items, symbols:unsorted_symbols};
+ return {items: items, symbols: unsorted_symbols};
};
ui.waitForRowsDisplayed = function (table, rows_total, callback, iteration) {
const alerted = "alerted_stats_legacy_" + neighbours_status[e].name;
promises.push($.ajax({
url: neighbours_status[e].url + "auth",
- headers: {Password:rspamd.getPassword()},
+ headers: {Password: rspamd.getPassword()},
success: function (data) {
sessionStorage.removeItem(alerted);
["config_id", "version", "uptime"].forEach(function (p) {
rspamd.tables.symbols = FooTable.init("#symbolsTable", {
columns: [
- {sorted:true, direction:"ASC", name:"group", title:"Group", style:{"font-size":"11px"}},
- {name:"symbol", title:"Symbol", style:{"font-size":"11px"}},
- {name:"description", title:"Description", breakpoints:"xs sm", style:{"font-size":"11px"}},
- {name:"weight", title:"Score", style:{"font-size":"11px"}},
- {name:"frequency",
- title:"Frequency",
- breakpoints:"xs sm",
- style:{"font-size":"11px"},
- sortValue:function (value) { return Number(value).toFixed(2); }},
- {name:"time", title:"Avg. time", breakpoints:"xs sm", style:{"font-size":"11px"}},
- {name:"save", title:"Save", style:{"font-size":"11px"}},
+ {sorted: true, direction: "ASC", name: "group", title: "Group", style: {"font-size": "11px"}},
+ {name: "symbol", title: "Symbol", style: {"font-size": "11px"}},
+ {name: "description", title: "Description", breakpoints: "xs sm", style: {"font-size": "11px"}},
+ {name: "weight", title: "Score", style: {"font-size": "11px"}},
+ {name: "frequency",
+ title: "Frequency",
+ breakpoints: "xs sm",
+ style: {"font-size": "11px"},
+ sortValue: function (value) { return Number(value).toFixed(2); }},
+ {name: "time", title: "Avg. time", breakpoints: "xs sm", style: {"font-size": "11px"}},
+ {name: "save", title: "Save", style: {"font-size": "11px"}},
],
rows: items[0],
paging: {
rspamd.alertMessage("alert-success", "Data successfully scanned");
const rows_total = $("#historyTable_scan > tbody > tr:not(.footable-detail-row)").length + 1;
- const o = rspamd.process_history_v2({rows:[json]}, "scan");
+ const o = rspamd.process_history_v2({rows: [json]}, "scan");
const items = o.items;
rspamd.symbols.scan.push(o.symbols[0]);
$("#scanForm")[0].reset();
$("#scanResult").hide();
$("#scanOutput tbody").remove();
- $("html, body").animate({scrollTop:0}, 1000);
+ $("html, body").animate({scrollTop: 0}, 1000);
return false;
});
stickytabs: "jquery.stickytabs.min"
},
shim: {
- app: {deps:["jquery"]},
- codejar: {exports: "CodeJar", deps:["linenumbers"]},
- bootstrap: {exports:"bootstrap", deps:["jquery"]}, // Popovers require jQuery
- d3: {exports:"d3"},
- d3evolution: {exports:"D3Evolution", deps:["d3.global", "jquery"]},
- d3pie: {exports:"D3Pie", deps:["d3.global", "jquery"]},
- fontawesome: {exports: "FontAwesome", deps:["fontawesome_solid"]},
- footable: {deps:["bootstrap", "jquery"]},
- linenumbers: {exports: "withLineNumbers", deps:["prism"]},
+ app: {deps: ["jquery"]},
+ codejar: {exports: "CodeJar", deps: ["linenumbers"]},
+ bootstrap: {exports: "bootstrap", deps: ["jquery"]}, // Popovers require jQuery
+ d3: {exports: "d3"},
+ d3evolution: {exports: "D3Evolution", deps: ["d3.global", "jquery"]},
+ d3pie: {exports: "D3Pie", deps: ["d3.global", "jquery"]},
+ fontawesome: {exports: "FontAwesome", deps: ["fontawesome_solid"]},
+ footable: {deps: ["bootstrap", "jquery"]},
+ linenumbers: {exports: "withLineNumbers", deps: ["prism"]},
prism: {exports: "Prism"},
- stickytabs: {deps:["jquery"]}
+ stickytabs: {deps: ["jquery"]}
},
waitSeconds: 30,
});