}
item.score = {
- "options": {
- "sortValue": item.score
+ options: {
+ sortValue: item.score
},
- "value": score_content
+ value: score_content
};
if (item.user == null) {
.map(function (e) { return e.str; })
.join("<br>\n");
item.time = {
- "value": unix_time_format(item.unix_time),
- "options": {
- "sortValue": item.unix_time
+ value: unix_time_format(item.unix_time),
+ options: {
+ sortValue: item.unix_time
}
};
var scan_time = item.time_real.toFixed(3) + " / " +
item.time_virtual.toFixed(3);
item.scan_time = {
- "options": {
- "sortValue": item.time_real
+ options: {
+ sortValue: item.time_real
},
- "value": scan_time
+ value: scan_time
};
item.id = item["message-id"];
item.time = unix_time_format(item.unix_time);
preprocess_item(item);
item.scan_time = {
- "options": {
- "sortValue": item.scan_time
+ options: {
+ sortValue: item.scan_time
},
- "value": item.scan_time
+ value: item.scan_time
};
item.time = {
- "value": unix_time_format(item.unix_time),
- "options": {
- "sortValue": item.unix_time
+ value: unix_time_format(item.unix_time),
+ options: {
+ sortValue: item.unix_time
}
};
function columns_v2() {
return [{
- "name": "id",
- "title": "ID",
- "style": {
+ name: "id",
+ title: "ID",
+ style: {
"font-size": "11px",
"minWidth": 130,
"overflow": "hidden",
"whiteSpace": "normal"
}
}, {
- "name": "ip",
- "title": "IP address",
- "breakpoints": "xs sm md",
- "style": {
+ name: "ip",
+ title: "IP address",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"minWidth": 88
}
}, {
- "name": "sender_mime",
- "title": "[Envelope From] From",
- "breakpoints": "xs sm md",
- "style": {
+ name: "sender_mime",
+ title: "[Envelope From] From",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"minWidth": 100,
"maxWidth": 200,
"word-wrap": "break-word"
}
}, {
- "name": "rcpt_mime_short",
- "title": "[Envelope To] To/Cc/Bcc",
- "breakpoints": "xs sm md",
- "style": {
+ name: "rcpt_mime_short",
+ title: "[Envelope To] To/Cc/Bcc",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"minWidth": 100,
"maxWidth": 200,
"word-wrap": "break-word"
}
}, {
- "name": "rcpt_mime",
- "title": "[Envelope To] To/Cc/Bcc",
- "breakpoints": "all",
- "style": {
+ name: "rcpt_mime",
+ title: "[Envelope To] To/Cc/Bcc",
+ breakpoints: "all",
+ style: {
"font-size": "11px",
"word-wrap": "break-word"
}
}, {
- "name": "subject",
- "title": "Subject",
- "breakpoints": "xs sm md",
- "style": {
+ name: "subject",
+ title: "Subject",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"word-break": "break-all",
"minWidth": 150
}
}, {
- "name": "action",
- "title": "Action",
- "style": {
+ name: "action",
+ title: "Action",
+ style: {
"font-size": "11px",
"minwidth": 82
}
}, {
- "name": "score",
- "title": "Score",
- "style": {
+ name: "score",
+ title: "Score",
+ style: {
"font-size": "11px",
"maxWidth": 110
},
- "sortValue": function (val) { return Number(val.options.sortValue); }
+ sortValue: function (val) { return Number(val.options.sortValue); }
}, {
- "name": "symbols",
- "title": "Symbols",
- "breakpoints": "all",
- "style": {
+ name: "symbols",
+ title: "Symbols",
+ breakpoints: "all",
+ style: {
"font-size": "11px",
"width": 550,
"maxWidth": 550
}
}, {
- "name": "size",
- "title": "Msg size",
- "breakpoints": "xs sm md",
- "style": {
+ name: "size",
+ title: "Msg size",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"minwidth": 50,
},
- "formatter": Humanize.compactInteger
+ formatter: Humanize.compactInteger
}, {
- "name": "scan_time",
- "title": "Scan time",
- "breakpoints": "xs sm md",
- "style": {
+ name: "scan_time",
+ title: "Scan time",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"maxWidth": 72
},
- "sortValue": function (val) { return Number(val.options.sortValue); }
+ sortValue: function (val) { return Number(val.options.sortValue); }
}, {
- "sorted": true,
- "direction": "DESC",
- "name": "time",
- "title": "Time",
- "style": {
+ sorted: true,
+ direction: "DESC",
+ name: "time",
+ title: "Time",
+ style: {
"font-size": "11px"
},
- "sortValue": function (val) { return Number(val.options.sortValue); }
+ sortValue: function (val) { return Number(val.options.sortValue); }
}, {
- "name": "user",
- "title": "Authenticated user",
- "breakpoints": "xs sm md",
- "style": {
+ name: "user",
+ title: "Authenticated user",
+ breakpoints: "xs sm md",
+ style: {
"font-size": "11px",
"minWidth": 100,
"maxWidth": 130,
function columns_legacy() {
return [{
- "name": "id",
- "title": "ID",
- "style": {
+ name: "id",
+ title: "ID",
+ style: {
"font-size": "11px",
"width": 300,
"maxWidth": 300,
"whiteSpace": "nowrap"
}
}, {
- "name": "ip",
- "title": "IP address",
- "breakpoints": "xs sm",
- "style": {
+ name: "ip",
+ title: "IP address",
+ breakpoints: "xs sm",
+ style: {
"font-size": "11px",
"width": 150,
"maxWidth": 150
}
}, {
- "name": "action",
- "title": "Action",
- "style": {
+ name: "action",
+ title: "Action",
+ style: {
"font-size": "11px",
"width": 110,
"maxWidth": 110
}
}, {
- "name": "score",
- "title": "Score",
- "style": {
+ name: "score",
+ title: "Score",
+ style: {
"font-size": "11px",
"maxWidth": 110
},
- "sortValue": function (val) { return Number(val.options.sortValue); }
+ sortValue: function (val) { return Number(val.options.sortValue); }
}, {
- "name": "symbols",
- "title": "Symbols",
- "breakpoints": "all",
- "style": {
+ name: "symbols",
+ title: "Symbols",
+ breakpoints: "all",
+ style: {
"font-size": "11px",
"width": 550,
"maxWidth": 550
}
}, {
- "name": "size",
- "title": "Message size",
- "breakpoints": "xs sm",
- "style": {
+ name: "size",
+ title: "Message size",
+ breakpoints: "xs sm",
+ style: {
"font-size": "11px",
"width": 120,
"maxWidth": 120
},
- "formatter": Humanize.compactInteger
+ formatter: Humanize.compactInteger
}, {
- "name": "scan_time",
- "title": "Scan time",
- "breakpoints": "xs sm",
- "style": {
+ name: "scan_time",
+ title: "Scan time",
+ breakpoints: "xs sm",
+ style: {
"font-size": "11px",
"maxWidth": 80
},
- "sortValue": function (val) { return Number(val.options.sortValue); }
+ sortValue: function (val) { return Number(val.options.sortValue); }
}, {
- "sorted": true,
- "direction": "DESC",
- "name": "time",
- "title": "Time",
- "style": {
+ sorted: true,
+ direction: "DESC",
+ name: "time",
+ title: "Time",
+ style: {
"font-size": "11px"
},
- "sortValue": function (val) { return Number(val.options.sortValue); }
+ sortValue: function (val) { return Number(val.options.sortValue); }
}, {
- "name": "user",
- "title": "Authenticated user",
- "breakpoints": "xs sm",
- "style": {
+ name: "user",
+ title: "Authenticated user",
+ breakpoints: "xs sm",
+ style: {
"font-size": "11px",
"width": 200,
"maxWidth": 200
}
var process_functions = {
- "2": process_history_v2,
- "legacy": process_history_legacy
+ 2: process_history_v2,
+ legacy: process_history_legacy
};
var columns = {
- "2": columns_v2,
- "legacy": columns_legacy
+ 2: columns_v2,
+ legacy: columns_legacy
};
function process_history_data(data) {
$create : function () {
this._super();
var self = this, $form_grp = $("<div/>", {
- "class" : "form-group"
+ class : "form-group"
}).append($("<label/>", {
- "class" : "sr-only",
+ class : "sr-only",
text : "Action"
})).prependTo(self.$form);
self.$action = $("<select/>", {
- "class" : "form-control"
+ class : "form-control"
}).on("change", {
self : self
}, self._onStatusDropdownChanged).append(
// Update symbol description tooltips
$.each(symbolDescriptions, function (key, description) {
$("abbr[data-sym-key=" + key + "]").tooltip({
- "placement": "bottom",
- "html": true,
- "title": description
+ placement: "bottom",
+ html: true,
+ title: description
});
});
};
var items = process_history_data(data);
ft.history = FooTable.init("#historyTable", {
- "columns": get_history_columns(data),
- "rows": items,
- "paging": {
- "enabled": true,
- "limit": 5,
- "size": 25
+ columns: get_history_columns(data),
+ rows: items,
+ paging: {
+ enabled: true,
+ limit: 5,
+ size: 25
},
- "filtering": {
- "enabled": true,
- "position": "left",
- "connectors": false
+ filtering: {
+ enabled: true,
+ position: "left",
+ connectors: false
},
- "sorting": {
- "enabled": true
+ sorting: {
+ enabled: true
},
- "components": {
- "filtering": FooTable.actionFilter
+ components: {
+ filtering: FooTable.actionFilter
},
- "on": {
+ on: {
"ready.ft.table": drawTooltips,
"after.ft.sorting": drawTooltips,
"after.ft.paging": drawTooltips,
success: function (data) {
var items = process_history_data(data);
ft.history = FooTable.init("#historyTable", {
- "columns": get_history_columns(data),
- "rows": items,
- "paging": {
- "enabled": true,
- "limit": 5,
- "size": 25
+ columns: get_history_columns(data),
+ rows: items,
+ paging: {
+ enabled: true,
+ limit: 5,
+ size: 25
},
- "filtering": {
- "enabled": true,
- "position": "left",
- "connectors": false
+ filtering: {
+ enabled: true,
+ position: "left",
+ connectors: false
},
- "sorting": {
- "enabled": true
+ sorting: {
+ enabled: true
},
- "components": {
- "filtering": FooTable.actionFilter
+ components: {
+ filtering: FooTable.actionFilter
},
- "on": {
+ on: {
"ready.ft.table": drawTooltips,
"after.ft.sorting": drawTooltips,
"after.ft.paging": drawTooltips,
);
});
ft.errors = FooTable.init("#errorsLog", {
- "columns": [
- {"sorted": true, "direction": "DESC", "name":"ts", "title":"Time", "style":{"font-size":"11px", "width":300, "maxWidth":300}},
- {"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"}},
+ columns: [
+ {sorted: true, direction: "DESC", name:"ts", title:"Time", style:{"font-size":"11px", "width":300, "maxWidth":300}},
+ {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": data,
- "paging": {
- "enabled": true,
- "limit": 5,
- "size": 25
+ rows: data,
+ paging: {
+ enabled: true,
+ limit: 5,
+ size: 25
},
- "filtering": {
- "enabled": true,
- "position": "left",
- "connectors": false
+ filtering: {
+ enabled: true,
+ position: "left",
+ connectors: false
},
- "sorting": {
- "enabled": true
+ sorting: {
+ enabled: true
}
});
}
$create : function () {
this._super();
var self = this, $form_grp = $("<div/>", {
- "class" : "form-group"
+ class : "form-group"
}).append($("<label/>", {
- "class" : "sr-only",
+ class : "sr-only",
text : "Group"
})).prependTo(self.$form);
self.$group = $("<select/>", {
- "class" : "form-control"
+ class : "form-control"
}).on("change", {
self : self
}, self._onStatusDropdownChanged).append(
}
});
ft.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"}},
+ 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"}},
],
- "rows": items[0],
- "paging": {
- "enabled": true,
- "limit": 5,
- "size": 25
+ rows: items[0],
+ paging: {
+ enabled: true,
+ limit: 5,
+ size: 25
},
- "filtering": {
- "enabled": true,
- "position": "left",
- "connectors": false
+ filtering: {
+ enabled: true,
+ position: "left",
+ connectors: false
},
- "sorting": {
- "enabled": true
+ sorting: {
+ enabled: true
},
components: {
filtering: FooTable.groupFilter
},
- "on": {
+ on: {
"ready.ft.table": function () {
if (rspamd.read_only) {
$(".mb-disabled").attr("disabled", true);