[Web] Set pageLength to pagination_size + repect savedState...
Fix width in quarantine table.
This commit is contained in:
parent
05d1a974eb
commit
6ff3f3f044
@ -1,102 +1,104 @@
|
|||||||
.pagination a {
|
.pagination a {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel.panel-default {
|
.panel.panel-default {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-responsive {
|
.table-responsive {
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-responsive {
|
.table-responsive {
|
||||||
overflow-x: scroll !important;
|
overflow-x: scroll !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-add-item {
|
.footer-add-item {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 1920px) {
|
@media (min-width: 1920px) {
|
||||||
.container {
|
.container {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mass-actions-quarantine {
|
.mass-actions-quarantine {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inputMissingAttr {
|
.inputMissingAttr {
|
||||||
border-color: #FF4136;
|
border-color: #FF4136;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal#qidDetailModal p {
|
.modal#qidDetailModal p {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
span#qid_detail_score {
|
span#qid_detail_score {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.rspamd-symbol {
|
span.rspamd-symbol {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 2px 6px 2px 0;
|
margin: 2px 6px 2px 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 0 7px;
|
padding: 0 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.rspamd-symbol.positive {
|
span.rspamd-symbol.positive {
|
||||||
background: #4CAF50;
|
background: #4CAF50;
|
||||||
border: 1px solid #4CAF50;
|
border: 1px solid #4CAF50;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.rspamd-symbol.negative {
|
span.rspamd-symbol.negative {
|
||||||
background: #ff4136;
|
background: #ff4136;
|
||||||
border: 1px solid #ff4136;
|
border: 1px solid #ff4136;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.rspamd-symbol.neutral {
|
span.rspamd-symbol.neutral {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
color: #333;
|
color: #333;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.rspamd-symbol span.score {
|
span.rspamd-symbol span.score {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.mail-address-item {
|
span.mail-address-item {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
padding: 2px 7px;
|
padding: 2px 7px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 2px 6px 2px 0;
|
margin: 2px 6px 2px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table tbody tr {
|
table tbody tr {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
table tbody tr td input[type="checkbox"] {
|
table tbody tr td input[type="checkbox"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.label-rspamd-action {
|
.label-rspamd-action {
|
||||||
font-size:110%;
|
font-size:110%;
|
||||||
margin:20px;
|
margin:20px;
|
||||||
}
|
}
|
||||||
|
.senders-mw220 {
|
||||||
|
max-width: 220px;
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// set update loop container list
|
// set update loop container list
|
||||||
containersToUpdate = {}
|
containersToUpdate = {};
|
||||||
// set default ChartJs Font Color
|
// set default ChartJs Font Color
|
||||||
Chart.defaults.color = '#999';
|
Chart.defaults.color = '#999';
|
||||||
// create host cpu and mem charts
|
// create host cpu and mem charts
|
||||||
@ -44,14 +44,13 @@ $(document).ready(function() {
|
|||||||
check_update(mailcow_info.version_tag, mailcow_info.project_url);
|
check_update(mailcow_info.version_tag, mailcow_info.project_url);
|
||||||
}
|
}
|
||||||
$("#maiclow_version").click(function(){
|
$("#maiclow_version").click(function(){
|
||||||
if (mailcow_cc_role !== "admin" && mailcow_cc_role !== "domainadmin" ||
|
if (mailcow_cc_role !== "admin" && mailcow_cc_role !== "domainadmin" || mailcow_info.branch !== "master")
|
||||||
mailcow_info.branch !== "master")
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
showVersionModal("Version " + mailcow_info.version_tag, mailcow_info.version_tag);
|
showVersionModal("Version " + mailcow_info.version_tag, mailcow_info.version_tag);
|
||||||
})
|
})
|
||||||
// get public ips
|
// get public ips
|
||||||
$("#host_show_ip").click(function(){
|
$("#host_show_ip").click(function(){
|
||||||
$("#host_show_ip").find(".text").addClass("d-none");
|
$("#host_show_ip").find(".text").addClass("d-none");
|
||||||
$("#host_show_ip").find(".spinner-border").removeClass("d-none");
|
$("#host_show_ip").find(".spinner-border").removeClass("d-none");
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ $(document).ready(function() {
|
|||||||
$("#host_ipv6").addClass("d-block");
|
$("#host_ipv6").addClass("d-block");
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
||||||
$("#host_ipv6").removeClass("d-none");
|
$("#host_ipv6").removeClass("d-none");
|
||||||
$("#host_ipv6").addClass("d-block");
|
$("#host_ipv6").addClass("d-block");
|
||||||
$("#host_ipv6").addClass("text-danger");
|
$("#host_ipv6").addClass("text-danger");
|
||||||
@ -119,10 +118,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#autodiscover_log').DataTable({
|
var table = $('#autodiscover_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -188,10 +188,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#postfix_log').DataTable({
|
var table = $('#postfix_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -242,10 +243,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#watchdog_log').DataTable({
|
var table = $('#watchdog_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -300,10 +302,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#api_log').DataTable({
|
var table = $('#api_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -352,7 +355,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-api-logs', '#api_log');
|
hideTableExpandCollapseBtn('#tab-api-logs', '#api_log');
|
||||||
});
|
});
|
||||||
@ -365,10 +368,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#rl_log').DataTable({
|
var table = $('#rl_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -455,7 +459,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-rl-logs', '#rl_log');
|
hideTableExpandCollapseBtn('#tab-rl-logs', '#rl_log');
|
||||||
});
|
});
|
||||||
@ -468,10 +472,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#ui_logs').DataTable({
|
var table = $('#ui_logs').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -538,7 +543,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-ui-logs', '#ui_log');
|
hideTableExpandCollapseBtn('#tab-ui-logs', '#ui_log');
|
||||||
});
|
});
|
||||||
@ -551,10 +556,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#sasl_logs').DataTable({
|
var table = $('#sasl_logs').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -598,7 +604,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-sasl-logs', '#sasl_logs');
|
hideTableExpandCollapseBtn('#tab-sasl-logs', '#sasl_logs');
|
||||||
});
|
});
|
||||||
@ -611,10 +617,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#acme_log').DataTable({
|
var table = $('#acme_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -647,7 +654,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-acme-logs', '#acme_log');
|
hideTableExpandCollapseBtn('#tab-acme-logs', '#acme_log');
|
||||||
});
|
});
|
||||||
@ -660,10 +667,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#netfilter_log').DataTable({
|
var table = $('#netfilter_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -701,7 +709,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-netfilter-logs', '#netfilter_log');
|
hideTableExpandCollapseBtn('#tab-netfilter-logs', '#netfilter_log');
|
||||||
});
|
});
|
||||||
@ -714,10 +722,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#sogo_log').DataTable({
|
var table = $('#sogo_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -755,7 +764,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-sogo-logs', '#sogo_log');
|
hideTableExpandCollapseBtn('#tab-sogo-logs', '#sogo_log');
|
||||||
});
|
});
|
||||||
@ -768,10 +777,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#dovecot_log').DataTable({
|
var table = $('#dovecot_log').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -883,10 +893,11 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var table = $('#rspamd_history').DataTable({
|
var table = $('#rspamd_history').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
|
pageLength: log_pagination_size,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"tr" +
|
"tr" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
@ -983,7 +994,7 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
hideTableExpandCollapseBtn('#tab-rspamd-history', '#rspamd_history');
|
hideTableExpandCollapseBtn('#tab-rspamd-history', '#rspamd_history');
|
||||||
});
|
});
|
||||||
@ -998,31 +1009,31 @@ jQuery(function($){
|
|||||||
item.rcpt = escapeHtml(item.rcpt_smtp.join(", "));
|
item.rcpt = escapeHtml(item.rcpt_smtp.join(", "));
|
||||||
}
|
}
|
||||||
item.symbols = Object.keys(item.symbols).sort(function (a, b) {
|
item.symbols = Object.keys(item.symbols).sort(function (a, b) {
|
||||||
if (item.symbols[a].score === 0) return 1
|
if (item.symbols[a].score === 0) return 1;
|
||||||
if (item.symbols[b].score === 0) return -1
|
if (item.symbols[b].score === 0) return -1;
|
||||||
if (item.symbols[b].score < 0 && item.symbols[a].score < 0) {
|
if (item.symbols[b].score < 0 && item.symbols[a].score < 0) {
|
||||||
return item.symbols[a].score - item.symbols[b].score
|
return item.symbols[a].score - item.symbols[b].score;
|
||||||
}
|
}
|
||||||
if (item.symbols[b].score > 0 && item.symbols[a].score > 0) {
|
if (item.symbols[b].score > 0 && item.symbols[a].score > 0) {
|
||||||
return item.symbols[b].score - item.symbols[a].score
|
return item.symbols[b].score - item.symbols[a].score;
|
||||||
}
|
}
|
||||||
return item.symbols[b].score - item.symbols[a].score
|
return item.symbols[b].score - item.symbols[a].score;
|
||||||
}).map(function(key) {
|
}).map(function(key) {
|
||||||
var sym = item.symbols[key];
|
var sym = item.symbols[key];
|
||||||
if (sym.score < 0) {
|
if (sym.score < 0) {
|
||||||
sym.score_formatted = '(<span class="text-success"><b>' + sym.score + '</b></span>)'
|
sym.score_formatted = '(<span class="text-success"><b>' + sym.score + '</b></span>)';
|
||||||
}
|
}
|
||||||
else if (sym.score === 0) {
|
else if (sym.score === 0) {
|
||||||
sym.score_formatted = '(<span><b>' + sym.score + '</b></span>)'
|
sym.score_formatted = '(<span><b>' + sym.score + '</b></span>)';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sym.score_formatted = '(<span class="text-danger"><b>' + sym.score + '</b></span>)'
|
sym.score_formatted = '(<span class="text-danger"><b>' + sym.score + '</b></span>)';
|
||||||
}
|
}
|
||||||
var str = '<strong>' + key + '</strong> ' + sym.score_formatted;
|
var str = '<strong>' + key + '</strong> ' + sym.score_formatted;
|
||||||
if (sym.options) {
|
if (sym.options) {
|
||||||
str += ' [' + escapeHtml(sym.options.join(", ")) + "]";
|
str += ' [' + escapeHtml(sym.options.join(", ")) + "]";
|
||||||
}
|
}
|
||||||
return str
|
return str;
|
||||||
}).join('<br>\n');
|
}).join('<br>\n');
|
||||||
item.subject = escapeHtml(item.subject);
|
item.subject = escapeHtml(item.subject);
|
||||||
var scan_time = item.time_real.toFixed(3);
|
var scan_time = item.time_real.toFixed(3);
|
||||||
@ -1155,14 +1166,14 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return data
|
return data;
|
||||||
};
|
};
|
||||||
$('.add_log_lines').on('click', function (e) {
|
$('.add_log_lines').on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var log_table= $(this).data("table")
|
var log_table= $(this).data("table");
|
||||||
var new_nrows = $(this).data("nrows")
|
var new_nrows = $(this).data("nrows");
|
||||||
var post_process = $(this).data("post-process")
|
var post_process = $(this).data("post-process");
|
||||||
var log_url = $(this).data("log-url")
|
var log_url = $(this).data("log-url");
|
||||||
if (log_table === undefined || new_nrows === undefined || post_process === undefined || log_url === undefined) {
|
if (log_table === undefined || new_nrows === undefined || post_process === undefined || log_url === undefined) {
|
||||||
console.log("no data-table or data-nrows or log_url or data-post-process attr found");
|
console.log("no data-table or data-nrows or log_url or data-post-process attr found");
|
||||||
return;
|
return;
|
||||||
@ -1184,9 +1195,9 @@ jQuery(function($){
|
|||||||
})
|
})
|
||||||
function hideTableExpandCollapseBtn(tab, table){
|
function hideTableExpandCollapseBtn(tab, table){
|
||||||
if ($(table).hasClass('collapsed'))
|
if ($(table).hasClass('collapsed'))
|
||||||
$(tab).find(".table_collapse_option").show();
|
$(tab).find(".table_collapse_option").show();
|
||||||
else
|
else
|
||||||
$(tab).find(".table_collapse_option").hide();
|
$(tab).find(".table_collapse_option").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// detect element visibility changes
|
// detect element visibility changes
|
||||||
@ -1220,7 +1231,6 @@ jQuery(function($){
|
|||||||
onVisible("[id^=rspamd_donut]", () => rspamd_pie_graph());
|
onVisible("[id^=rspamd_donut]", () => rspamd_pie_graph());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// start polling host stats if tab is active
|
// start polling host stats if tab is active
|
||||||
onVisible("[id^=tab-containers]", () => update_stats());
|
onVisible("[id^=tab-containers]", () => update_stats());
|
||||||
// start polling container stats if collapse is active
|
// start polling container stats if collapse is active
|
||||||
@ -1303,9 +1313,9 @@ function update_stats(timeout=5){
|
|||||||
if (mem_chart.data.labels.length > 30) mem_chart.data.labels.shift();
|
if (mem_chart.data.labels.length > 30) mem_chart.data.labels.shift();
|
||||||
|
|
||||||
cpu_chart.data.datasets[0].data.push(data.cpu.usage);
|
cpu_chart.data.datasets[0].data.push(data.cpu.usage);
|
||||||
if (cpu_chart.data.datasets[0].data.length > 30) cpu_chart.data.datasets[0].data.shift();
|
if (cpu_chart.data.datasets[0].data.length > 30) cpu_chart.data.datasets[0].data.shift();
|
||||||
mem_chart.data.datasets[0].data.push(data.memory.usage);
|
mem_chart.data.datasets[0].data.push(data.memory.usage);
|
||||||
if (mem_chart.data.datasets[0].data.length > 30) mem_chart.data.datasets[0].data.shift();
|
if (mem_chart.data.datasets[0].data.length > 30) mem_chart.data.datasets[0].data.shift();
|
||||||
|
|
||||||
cpu_chart.update();
|
cpu_chart.update();
|
||||||
mem_chart.update();
|
mem_chart.update();
|
||||||
@ -1464,23 +1474,23 @@ function createReadWriteChart(chart_id, read_lable, write_lable){
|
|||||||
};
|
};
|
||||||
var optionsNet = {
|
var optionsNet = {
|
||||||
interaction: {
|
interaction: {
|
||||||
mode: 'index'
|
mode: 'index'
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
yAxis: {
|
yAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
callback: function(i, index, ticks) {
|
callback: function(i, index, ticks) {
|
||||||
return formatBytes(i);
|
return formatBytes(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1528,13 +1538,13 @@ function createHostCpuAndMemChart(){
|
|||||||
};
|
};
|
||||||
var optionsCpu = {
|
var optionsCpu = {
|
||||||
interaction: {
|
interaction: {
|
||||||
mode: 'index'
|
mode: 'index'
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
yAxis: {
|
yAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
callback: function(i, index, ticks) {
|
callback: function(i, index, ticks) {
|
||||||
@ -1544,7 +1554,7 @@ function createHostCpuAndMemChart(){
|
|||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1566,13 +1576,13 @@ function createHostCpuAndMemChart(){
|
|||||||
};
|
};
|
||||||
var optionsMem = {
|
var optionsMem = {
|
||||||
interaction: {
|
interaction: {
|
||||||
mode: 'index'
|
mode: 'index'
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
yAxis: {
|
yAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
},
|
},
|
||||||
ticks: {
|
ticks: {
|
||||||
callback: function(i, index, ticks) {
|
callback: function(i, index, ticks) {
|
||||||
@ -1582,7 +1592,7 @@ function createHostCpuAndMemChart(){
|
|||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
grid: {
|
grid: {
|
||||||
display: false
|
display: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1678,22 +1688,22 @@ function parseGithubMarkdownLinks(inputText) {
|
|||||||
|
|
||||||
replacePattern1 = /(\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;
|
replacePattern1 = /(\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim;
|
||||||
replacedText = inputText.replace(replacePattern1, (matched, index, original, input_string) => {
|
replacedText = inputText.replace(replacePattern1, (matched, index, original, input_string) => {
|
||||||
if (matched.includes('github.com')){
|
if (matched.includes('github.com')){
|
||||||
// return short link if it's github link
|
// return short link if it's github link
|
||||||
last_uri_path = matched.split('/');
|
last_uri_path = matched.split('/');
|
||||||
last_uri_path = last_uri_path[last_uri_path.length - 1];
|
last_uri_path = last_uri_path[last_uri_path.length - 1];
|
||||||
|
|
||||||
// adjust Full Changelog link to match last git version and new git version, if link is a compare link
|
// adjust Full Changelog link to match last git version and new git version, if link is a compare link
|
||||||
if (matched.includes('/compare/') && mailcow_info.last_version_tag !== ''){
|
if (matched.includes('/compare/') && mailcow_info.last_version_tag !== ''){
|
||||||
matched = matched.replace(last_uri_path, mailcow_info.last_version_tag + '...' + mailcow_info.version_tag);
|
matched = matched.replace(last_uri_path, mailcow_info.last_version_tag + '...' + mailcow_info.version_tag);
|
||||||
last_uri_path = mailcow_info.last_version_tag + '...' + mailcow_info.version_tag;
|
last_uri_path = mailcow_info.last_version_tag + '...' + mailcow_info.version_tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<a href="' + matched + '" target="_blank">' + last_uri_path + '</a><br>';
|
return '<a href="' + matched + '" target="_blank">' + last_uri_path + '</a><br>';
|
||||||
};
|
};
|
||||||
|
|
||||||
// if it's not a github link, return complete link
|
// if it's not a github link, return complete link
|
||||||
return '<a href="' + matched + '" target="_blank">' + matched + '</a>';
|
return '<a href="' + matched + '" target="_blank">' + matched + '</a>';
|
||||||
});
|
});
|
||||||
|
|
||||||
return replacedText;
|
return replacedText;
|
||||||
|
@ -1,220 +1,222 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(".arrow-toggle").on('click', function(e) { e.preventDefault(); $(this).find('.arrow').toggleClass("animation"); });
|
$(".arrow-toggle").on('click', function(e) { e.preventDefault(); $(this).find('.arrow').toggleClass("animation"); });
|
||||||
$("#pushover_delete").click(function() { return confirm(lang.delete_ays); });
|
$("#pushover_delete").click(function() { return confirm(lang.delete_ays); });
|
||||||
$(".goto_checkbox").click(function( event ) {
|
$(".goto_checkbox").click(function( event ) {
|
||||||
$("form[data-id='editalias'] .goto_checkbox").not(this).prop('checked', false);
|
$("form[data-id='editalias'] .goto_checkbox").not(this).prop('checked', false);
|
||||||
if ($("form[data-id='editalias'] .goto_checkbox:checked").length > 0) {
|
if ($("form[data-id='editalias'] .goto_checkbox:checked").length > 0) {
|
||||||
$('#textarea_alias_goto').prop('disabled', true);
|
$('#textarea_alias_goto').prop('disabled', true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#textarea_alias_goto").removeAttr('disabled');
|
$("#textarea_alias_goto").removeAttr('disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#disable_sender_check").click(function( event ) {
|
$("#disable_sender_check").click(function( event ) {
|
||||||
if ($("form[data-id='editmailbox'] #disable_sender_check:checked").length > 0) {
|
if ($("form[data-id='editmailbox'] #disable_sender_check:checked").length > 0) {
|
||||||
$('#editSelectSenderACL').prop('disabled', true);
|
$('#editSelectSenderACL').prop('disabled', true);
|
||||||
$('#editSelectSenderACL').selectpicker('refresh');
|
$('#editSelectSenderACL').selectpicker('refresh');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#editSelectSenderACL').prop('disabled', false);
|
$('#editSelectSenderACL').prop('disabled', false);
|
||||||
$('#editSelectSenderACL').selectpicker('refresh');
|
$('#editSelectSenderACL').selectpicker('refresh');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ($("form[data-id='editalias'] .goto_checkbox:checked").length > 0) {
|
if ($("form[data-id='editalias'] .goto_checkbox:checked").length > 0) {
|
||||||
$('#textarea_alias_goto').prop('disabled', true);
|
$('#textarea_alias_goto').prop('disabled', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#mailbox-password-warning-close").click(function( event ) {
|
$("#mailbox-password-warning-close").click(function( event ) {
|
||||||
$('#mailbox-passwd-hidden-info').addClass('hidden');
|
$('#mailbox-passwd-hidden-info').addClass('hidden');
|
||||||
$('#mailbox-passwd-form-groups').removeClass('hidden');
|
$('#mailbox-passwd-form-groups').removeClass('hidden');
|
||||||
});
|
});
|
||||||
// Sender ACL
|
// Sender ACL
|
||||||
if ($("#editSelectSenderACL option[value='\*']:selected").length > 0){
|
if ($("#editSelectSenderACL option[value='\*']:selected").length > 0){
|
||||||
$("#sender_acl_disabled").show();
|
$("#sender_acl_disabled").show();
|
||||||
}
|
}
|
||||||
$('#editSelectSenderACL').change(function() {
|
$('#editSelectSenderACL').change(function() {
|
||||||
if ($("#editSelectSenderACL option[value='\*']:selected").length > 0){
|
if ($("#editSelectSenderACL option[value='\*']:selected").length > 0){
|
||||||
$("#sender_acl_disabled").show();
|
$("#sender_acl_disabled").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#sender_acl_disabled").hide();
|
$("#sender_acl_disabled").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Resources
|
// Resources
|
||||||
if ($("#editSelectMultipleBookings").val() == "custom") {
|
if ($("#editSelectMultipleBookings").val() == "custom") {
|
||||||
$("#multiple_bookings_custom_div").show();
|
$("#multiple_bookings_custom_div").show();
|
||||||
$('input[name=multiple_bookings]').val($("#multiple_bookings_custom").val());
|
$('input[name=multiple_bookings]').val($("#multiple_bookings_custom").val());
|
||||||
}
|
}
|
||||||
$("#editSelectMultipleBookings").change(function() {
|
$("#editSelectMultipleBookings").change(function() {
|
||||||
$('input[name=multiple_bookings]').val($("#editSelectMultipleBookings").val());
|
$('input[name=multiple_bookings]').val($("#editSelectMultipleBookings").val());
|
||||||
if ($('input[name=multiple_bookings]').val() == "custom") {
|
if ($('input[name=multiple_bookings]').val() == "custom") {
|
||||||
$("#multiple_bookings_custom_div").show();
|
$("#multiple_bookings_custom_div").show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#multiple_bookings_custom_div").hide();
|
$("#multiple_bookings_custom_div").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$("#multiple_bookings_custom").bind("change keypress keyup blur", function() {
|
$("#multiple_bookings_custom").bind("change keypress keyup blur", function() {
|
||||||
$('input[name=multiple_bookings]').val($("#multiple_bookings_custom").val());
|
$('input[name=multiple_bookings]').val($("#multiple_bookings_custom").val());
|
||||||
});
|
});
|
||||||
|
|
||||||
// load tags
|
// load tags
|
||||||
if ($('#tags').length){
|
if ($('#tags').length){
|
||||||
var tagsEl = $('#tags').parent().find('.tag-values')[0];
|
var tagsEl = $('#tags').parent().find('.tag-values')[0];
|
||||||
console.log($(tagsEl).val())
|
console.log($(tagsEl).val())
|
||||||
var tags = JSON.parse($(tagsEl).val());
|
var tags = JSON.parse($(tagsEl).val());
|
||||||
$(tagsEl).val("");
|
$(tagsEl).val("");
|
||||||
|
|
||||||
for (var i = 0; i < tags.length; i++)
|
for (var i = 0; i < tags.length; i++)
|
||||||
addTag($('#tags'), tags[i]);
|
addTag($('#tags'), tags[i]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
||||||
function validateEmail(email) {
|
function validateEmail(email) {
|
||||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||||
return re.test(email);
|
return re.test(email);
|
||||||
}
|
}
|
||||||
function draw_wl_policy_domain_table() {
|
function draw_wl_policy_domain_table() {
|
||||||
$('#wl_policy_domain_table').DataTable({
|
$('#wl_policy_domain_table').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
pageLength: pagination_size,
|
||||||
"tr" +
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
"tr" +
|
||||||
language: lang_datatables,
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
ajax: {
|
language: lang_datatables,
|
||||||
type: "GET",
|
ajax: {
|
||||||
url: '/api/v1/get/policy_wl_domain/' + table_for_domain,
|
type: "GET",
|
||||||
dataSrc: function(data){
|
url: '/api/v1/get/policy_wl_domain/' + table_for_domain,
|
||||||
$.each(data, function (i, item) {
|
dataSrc: function(data){
|
||||||
if (!validateEmail(item.object)) {
|
$.each(data, function (i, item) {
|
||||||
item.chkbox = '<input type="checkbox" data-id="policy_wl_domain" name="multi_select" value="' + item.prefid + '" />';
|
if (!validateEmail(item.object)) {
|
||||||
}
|
item.chkbox = '<input type="checkbox" data-id="policy_wl_domain" name="multi_select" value="' + item.prefid + '" />';
|
||||||
else {
|
}
|
||||||
item.chkbox = '<input type="checkbox" disabled title="' + lang_user.spamfilter_table_domain_policy + '" />';
|
else {
|
||||||
}
|
item.chkbox = '<input type="checkbox" disabled title="' + lang_user.spamfilter_table_domain_policy + '" />';
|
||||||
});
|
}
|
||||||
|
});
|
||||||
return data;
|
|
||||||
}
|
return data;
|
||||||
},
|
}
|
||||||
columns: [
|
},
|
||||||
{
|
columns: [
|
||||||
// placeholder, so checkbox will not block child row toggle
|
{
|
||||||
title: '',
|
// placeholder, so checkbox will not block child row toggle
|
||||||
data: null,
|
title: '',
|
||||||
searchable: false,
|
data: null,
|
||||||
orderable: false,
|
searchable: false,
|
||||||
defaultContent: ''
|
orderable: false,
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: '',
|
{
|
||||||
data: 'chkbox',
|
title: '',
|
||||||
searchable: false,
|
data: 'chkbox',
|
||||||
orderable: false,
|
searchable: false,
|
||||||
defaultContent: ''
|
orderable: false,
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: 'ID',
|
{
|
||||||
data: 'prefid',
|
title: 'ID',
|
||||||
defaultContent: ''
|
data: 'prefid',
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: lang_user.spamfilter_table_rule,
|
{
|
||||||
data: 'value',
|
title: lang_user.spamfilter_table_rule,
|
||||||
defaultContent: ''
|
data: 'value',
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: 'Scope',
|
{
|
||||||
data: 'object',
|
title: 'Scope',
|
||||||
defaultContent: ''
|
data: 'object',
|
||||||
}
|
defaultContent: ''
|
||||||
]
|
}
|
||||||
});
|
]
|
||||||
}
|
});
|
||||||
function draw_bl_policy_domain_table() {
|
}
|
||||||
$('#bl_policy_domain_table').DataTable({
|
function draw_bl_policy_domain_table() {
|
||||||
responsive: true,
|
$('#bl_policy_domain_table').DataTable({
|
||||||
processing: true,
|
responsive: true,
|
||||||
serverSide: false,
|
processing: true,
|
||||||
stateSave: true,
|
serverSide: false,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
stateSave: true,
|
||||||
"tr" +
|
pageLength: pagination_size,
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
language: lang_datatables,
|
"tr" +
|
||||||
ajax: {
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
type: "GET",
|
language: lang_datatables,
|
||||||
url: '/api/v1/get/policy_bl_domain/' + table_for_domain,
|
ajax: {
|
||||||
dataSrc: function(data){
|
type: "GET",
|
||||||
$.each(data, function (i, item) {
|
url: '/api/v1/get/policy_bl_domain/' + table_for_domain,
|
||||||
if (!validateEmail(item.object)) {
|
dataSrc: function(data){
|
||||||
item.chkbox = '<input type="checkbox" data-id="policy_bl_domain" name="multi_select" value="' + item.prefid + '" />';
|
$.each(data, function (i, item) {
|
||||||
}
|
if (!validateEmail(item.object)) {
|
||||||
else {
|
item.chkbox = '<input type="checkbox" data-id="policy_bl_domain" name="multi_select" value="' + item.prefid + '" />';
|
||||||
item.chkbox = '<input type="checkbox" disabled tooltip="' + lang_user.spamfilter_table_domain_policy + '" />';
|
}
|
||||||
}
|
else {
|
||||||
});
|
item.chkbox = '<input type="checkbox" disabled tooltip="' + lang_user.spamfilter_table_domain_policy + '" />';
|
||||||
|
}
|
||||||
return data;
|
});
|
||||||
}
|
|
||||||
},
|
return data;
|
||||||
columns: [
|
}
|
||||||
{
|
},
|
||||||
// placeholder, so checkbox will not block child row toggle
|
columns: [
|
||||||
title: '',
|
{
|
||||||
data: null,
|
// placeholder, so checkbox will not block child row toggle
|
||||||
searchable: false,
|
title: '',
|
||||||
orderable: false,
|
data: null,
|
||||||
defaultContent: ''
|
searchable: false,
|
||||||
},
|
orderable: false,
|
||||||
{
|
defaultContent: ''
|
||||||
title: '',
|
},
|
||||||
data: 'chkbox',
|
{
|
||||||
searchable: false,
|
title: '',
|
||||||
orderable: false,
|
data: 'chkbox',
|
||||||
defaultContent: ''
|
searchable: false,
|
||||||
},
|
orderable: false,
|
||||||
{
|
defaultContent: ''
|
||||||
title: 'ID',
|
},
|
||||||
data: 'prefid',
|
{
|
||||||
defaultContent: ''
|
title: 'ID',
|
||||||
},
|
data: 'prefid',
|
||||||
{
|
defaultContent: ''
|
||||||
title: lang_user.spamfilter_table_rule,
|
},
|
||||||
data: 'value',
|
{
|
||||||
defaultContent: ''
|
title: lang_user.spamfilter_table_rule,
|
||||||
},
|
data: 'value',
|
||||||
{
|
defaultContent: ''
|
||||||
title: 'Scope',
|
},
|
||||||
data: 'object',
|
{
|
||||||
defaultContent: ''
|
title: 'Scope',
|
||||||
}
|
data: 'object',
|
||||||
]
|
defaultContent: ''
|
||||||
});
|
}
|
||||||
}
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
// detect element visibility changes
|
|
||||||
function onVisible(element, callback) {
|
|
||||||
$(document).ready(function() {
|
// detect element visibility changes
|
||||||
element_object = document.querySelector(element);
|
function onVisible(element, callback) {
|
||||||
if (element_object === null) return;
|
$(document).ready(function() {
|
||||||
|
element_object = document.querySelector(element);
|
||||||
new IntersectionObserver((entries, observer) => {
|
if (element_object === null) return;
|
||||||
entries.forEach(entry => {
|
|
||||||
if(entry.intersectionRatio > 0) {
|
new IntersectionObserver((entries, observer) => {
|
||||||
callback(element_object);
|
entries.forEach(entry => {
|
||||||
observer.disconnect();
|
if(entry.intersectionRatio > 0) {
|
||||||
}
|
callback(element_object);
|
||||||
});
|
observer.disconnect();
|
||||||
}).observe(element_object);
|
}
|
||||||
});
|
});
|
||||||
}
|
}).observe(element_object);
|
||||||
// Draw Table if tab is active
|
});
|
||||||
onVisible("[id^=wl_policy_domain_table]", () => draw_wl_policy_domain_table());
|
}
|
||||||
onVisible("[id^=bl_policy_domain_table]", () => draw_bl_policy_domain_table());
|
// Draw Table if tab is active
|
||||||
});
|
onVisible("[id^=wl_policy_domain_table]", () => draw_wl_policy_domain_table());
|
||||||
|
onVisible("[id^=bl_policy_domain_table]", () => draw_bl_policy_domain_table());
|
||||||
|
});
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,71 +1,71 @@
|
|||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
var qitem = $('legend').data('hash');
|
var qitem = $('legend').data('hash');
|
||||||
var qError = $("#qid_error");
|
var qError = $("#qid_error");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/inc/ajax/qitem_details.php',
|
url: '/inc/ajax/qitem_details.php',
|
||||||
data: { hash: qitem },
|
data: { hash: qitem },
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data){
|
success: function(data){
|
||||||
$('[data-id="qitems_single"]').each(function(index) {
|
$('[data-id="qitems_single"]').each(function(index) {
|
||||||
$(this).attr("data-item", qitem);
|
$(this).attr("data-item", qitem);
|
||||||
});
|
});
|
||||||
$('#qid_detail_subj').text(data.subject);
|
$('#qid_detail_subj').text(data.subject);
|
||||||
$('#qid_detail_hfrom').text(data.header_from);
|
$('#qid_detail_hfrom').text(data.header_from);
|
||||||
$('#qid_detail_efrom').text(data.env_from);
|
$('#qid_detail_efrom').text(data.env_from);
|
||||||
$('#qid_detail_score').html('');
|
$('#qid_detail_score').html('');
|
||||||
$('#qid_detail_symbols').html('');
|
$('#qid_detail_symbols').html('');
|
||||||
$('#qid_detail_recipients').html('');
|
$('#qid_detail_recipients').html('');
|
||||||
$('#qid_detail_fuzzy').html('');
|
$('#qid_detail_fuzzy').html('');
|
||||||
if (typeof data.fuzzy_hashes === 'object' && data.fuzzy_hashes !== null && data.fuzzy_hashes.length !== 0) {
|
if (typeof data.fuzzy_hashes === 'object' && data.fuzzy_hashes !== null && data.fuzzy_hashes.length !== 0) {
|
||||||
$.each(data.fuzzy_hashes, function (index, value) {
|
$.each(data.fuzzy_hashes, function (index, value) {
|
||||||
$('#qid_detail_fuzzy').append('<p style="font-family:monospace">' + value + '</p>');
|
$('#qid_detail_fuzzy').append('<p style="font-family:monospace">' + value + '</p>');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$('#qid_detail_fuzzy').append('-');
|
$('#qid_detail_fuzzy').append('-');
|
||||||
}
|
}
|
||||||
if (typeof data.symbols !== 'undefined') {
|
if (typeof data.symbols !== 'undefined') {
|
||||||
data.symbols.sort(function (a, b) {
|
data.symbols.sort(function (a, b) {
|
||||||
if (a.score === 0) return 1
|
if (a.score === 0) return 1;
|
||||||
if (b.score === 0) return -1
|
if (b.score === 0) return -1;
|
||||||
if (b.score < 0 && a.score < 0) {
|
if (b.score < 0 && a.score < 0) {
|
||||||
return a.score - b.score
|
return a.score - b.score;
|
||||||
}
|
}
|
||||||
if (b.score > 0 && a.score > 0) {
|
if (b.score > 0 && a.score > 0) {
|
||||||
return b.score - a.score
|
return b.score - a.score;
|
||||||
}
|
}
|
||||||
return b.score - a.score
|
return b.score - a.score;
|
||||||
})
|
})
|
||||||
$.each(data.symbols, function (index, value) {
|
$.each(data.symbols, function (index, value) {
|
||||||
var highlightClass = ''
|
var highlightClass = '';
|
||||||
if (value.score > 0) highlightClass = 'negative'
|
if (value.score > 0) highlightClass = 'negative';
|
||||||
else if (value.score < 0) highlightClass = 'positive'
|
else if (value.score < 0) highlightClass = 'positive';
|
||||||
else highlightClass = 'neutral'
|
else highlightClass = 'neutral';
|
||||||
$('#qid_detail_symbols').append('<span data-bs-toggle="tooltip" class="rspamd-symbol ' + highlightClass + '" title="' + (value.options ? value.options.join(', ') : '') + '">' + value.name + ' (<span class="score">' + value.score + '</span>)</span>');
|
$('#qid_detail_symbols').append('<span data-bs-toggle="tooltip" class="rspamd-symbol ' + highlightClass + '" title="' + (value.options ? value.options.join(', ') : '') + '">' + value.name + ' (<span class="score">' + value.score + '</span>)</span>');
|
||||||
});
|
});
|
||||||
$('[data-bs-toggle="tooltip"]').tooltip()
|
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||||
}
|
}
|
||||||
if (typeof data.score !== 'undefined' && typeof data.action !== 'undefined') {
|
if (typeof data.score !== 'undefined' && typeof data.action !== 'undefined') {
|
||||||
if (data.action === "add header") {
|
if (data.action === "add header") {
|
||||||
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.junk_folder + '</span>');
|
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.junk_folder + '</span>');
|
||||||
} else if (data.action === "reject") {
|
} else if (data.action === "reject") {
|
||||||
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-danger"><b>' + data.score + '</b> - ' + lang.rejected + '</span>');
|
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-danger"><b>' + data.score + '</b> - ' + lang.rejected + '</span>');
|
||||||
} else if (data.action === "rewrite subject") {
|
} else if (data.action === "rewrite subject") {
|
||||||
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.rewrite_subject + '</span>');
|
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.rewrite_subject + '</span>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeof data.recipients !== 'undefined') {
|
if (typeof data.recipients !== 'undefined') {
|
||||||
$.each(data.recipients, function(index, value) {
|
$.each(data.recipients, function(index, value) {
|
||||||
var elem = $('<span class="mail-address-item"></span>');
|
var elem = $('<span class="mail-address-item"></span>');
|
||||||
elem.text(value.address + ' (' + value.type.toUpperCase() + ')');
|
elem.text(value.address + ' (' + value.type.toUpperCase() + ')');
|
||||||
$('#qid_detail_recipients').append(elem);
|
$('#qid_detail_recipients').append(elem);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(data){
|
error: function(data){
|
||||||
if (typeof data.error !== 'undefined') {
|
if (typeof data.error !== 'undefined') {
|
||||||
qError.text("Error loading quarantine item");
|
qError.text("Error loading quarantine item");
|
||||||
qError.show();
|
qError.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,286 +1,297 @@
|
|||||||
// Base64 functions
|
// Base64 functions
|
||||||
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(r){var t,e,o,a,h,n,c,d="",C=0;for(r=Base64._utf8_encode(r);C<r.length;)a=(t=r.charCodeAt(C++))>>2,h=(3&t)<<4|(e=r.charCodeAt(C++))>>4,n=(15&e)<<2|(o=r.charCodeAt(C++))>>6,c=63&o,isNaN(e)?n=c=64:isNaN(o)&&(c=64),d=d+this._keyStr.charAt(a)+this._keyStr.charAt(h)+this._keyStr.charAt(n)+this._keyStr.charAt(c);return d},decode:function(r){var t,e,o,a,h,n,c="",d=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<r.length;)t=this._keyStr.indexOf(r.charAt(d++))<<2|(a=this._keyStr.indexOf(r.charAt(d++)))>>4,e=(15&a)<<4|(h=this._keyStr.indexOf(r.charAt(d++)))>>2,o=(3&h)<<6|(n=this._keyStr.indexOf(r.charAt(d++))),c+=String.fromCharCode(t),64!=h&&(c+=String.fromCharCode(e)),64!=n&&(c+=String.fromCharCode(o));return c=Base64._utf8_decode(c)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var t="",e=0;e<r.length;e++){var o=r.charCodeAt(e);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(r){for(var t="",e=0,o=c1=c2=0;e<r.length;)(o=r.charCodeAt(e))<128?(t+=String.fromCharCode(o),e++):o>191&&o<224?(c2=r.charCodeAt(e+1),t+=String.fromCharCode((31&o)<<6|63&c2),e+=2):(c2=r.charCodeAt(e+1),c3=r.charCodeAt(e+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),e+=3);return t}};
|
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(r){var t,e,o,a,h,n,c,d="",C=0;for(r=Base64._utf8_encode(r);C<r.length;)a=(t=r.charCodeAt(C++))>>2,h=(3&t)<<4|(e=r.charCodeAt(C++))>>4,n=(15&e)<<2|(o=r.charCodeAt(C++))>>6,c=63&o,isNaN(e)?n=c=64:isNaN(o)&&(c=64),d=d+this._keyStr.charAt(a)+this._keyStr.charAt(h)+this._keyStr.charAt(n)+this._keyStr.charAt(c);return d},decode:function(r){var t,e,o,a,h,n,c="",d=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<r.length;)t=this._keyStr.indexOf(r.charAt(d++))<<2|(a=this._keyStr.indexOf(r.charAt(d++)))>>4,e=(15&a)<<4|(h=this._keyStr.indexOf(r.charAt(d++)))>>2,o=(3&h)<<6|(n=this._keyStr.indexOf(r.charAt(d++))),c+=String.fromCharCode(t),64!=h&&(c+=String.fromCharCode(e)),64!=n&&(c+=String.fromCharCode(o));return c=Base64._utf8_decode(c)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var t="",e=0;e<r.length;e++){var o=r.charCodeAt(e);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(r){for(var t="",e=0,o=c1=c2=0;e<r.length;)(o=r.charCodeAt(e))<128?(t+=String.fromCharCode(o),e++):o>191&&o<224?(c2=r.charCodeAt(e+1),t+=String.fromCharCode((31&o)<<6|63&c2),e+=2):(c2=r.charCodeAt(e+1),c3=r.charCodeAt(e+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),e+=3);return t}};
|
||||||
|
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
acl_data = JSON.parse(acl);
|
acl_data = JSON.parse(acl);
|
||||||
// http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
|
// http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery
|
||||||
var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};
|
var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};
|
||||||
function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})}
|
function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})}
|
||||||
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
||||||
$(".refresh_table").on('click', function(e) {
|
$(".refresh_table").on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var table_name = $(this).data('table');
|
var table_name = $(this).data('table');
|
||||||
$('#' + table_name).DataTable().ajax.reload();
|
$('#' + table_name).DataTable().ajax.reload();
|
||||||
});
|
});
|
||||||
function draw_quarantine_table() {
|
function draw_quarantine_table() {
|
||||||
var table = $('#quarantinetable').DataTable({
|
var table = $('#quarantinetable').DataTable({
|
||||||
responsive: true,
|
responsive: true,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
pageLength: pagination_size,
|
||||||
"tr" +
|
order: [[2, 'desc']],
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
lengthMenu: [
|
||||||
language: lang_datatables,
|
[10, 25, 50, 100, -1],
|
||||||
initComplete: function(){
|
[10, 25, 50, 100, 'all']
|
||||||
hideTableExpandCollapseBtn('#quarantinetable');
|
],
|
||||||
},
|
pagingType: 'first_last_numbers',
|
||||||
ajax: {
|
aColumns: [
|
||||||
type: "GET",
|
{ sWidth: '8.25%' },
|
||||||
url: "/api/v1/get/quarantine/all",
|
{ sClass: 'classDataTable' }
|
||||||
dataSrc: function(data){
|
],
|
||||||
$.each(data, function (i, item) {
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
if (item.subject === null) {
|
"tr" +
|
||||||
item.subject = '';
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
} else {
|
language: lang_datatables,
|
||||||
item.subject = escapeHtml(item.subject);
|
initComplete: function(){
|
||||||
}
|
hideTableExpandCollapseBtn('#quarantinetable');
|
||||||
if (item.score === null) {
|
},
|
||||||
item.score = '-';
|
ajax: {
|
||||||
}
|
type: "GET",
|
||||||
if (item.virus_flag > 0) {
|
url: "/api/v1/get/quarantine/all",
|
||||||
item.virus = '<span class="badge fs-6 bg-danger">' + lang.high_danger + '</span>';
|
dataSrc: function(data){
|
||||||
} else {
|
$.each(data, function (i, item) {
|
||||||
item.virus = '<span class="badge fs-6 bg-secondary">' + lang.neutral_danger + '</span>';
|
if (item.subject === null) {
|
||||||
}
|
item.subject = '';
|
||||||
if (item.action === "reject") {
|
} else {
|
||||||
item.rspamdaction = '<span class="badge fs-6 bg-danger">' + lang.rejected + '</span>';
|
item.subject = escapeHtml(item.subject);
|
||||||
} else if (item.action === "add header") {
|
}
|
||||||
item.rspamdaction = '<span class="badge fs-6 bg-warning">' + lang.junk_folder + '</span>';
|
if (item.score === null) {
|
||||||
} else if (item.action === "rewrite subject") {
|
item.score = '-';
|
||||||
item.rspamdaction = '<span class="badge fs-6 bg-warning">' + lang.rewrite_subject + '</span>';
|
}
|
||||||
}
|
if (item.virus_flag > 0) {
|
||||||
if(item.notified > 0) {
|
item.virus = '<span class="badge fs-6 bg-danger">' + lang.high_danger + '</span>';
|
||||||
item.notified = '✔';
|
} else {
|
||||||
} else {
|
item.virus = '<span class="badge fs-6 bg-secondary">' + lang.neutral_danger + '</span>';
|
||||||
item.notified = '✖';
|
}
|
||||||
}
|
if (item.action === "reject") {
|
||||||
if (acl_data.login_as === 1) {
|
item.rspamdaction = '<span class="badge fs-6 bg-danger">' + lang.rejected + '</span>';
|
||||||
item.action = '<div class="btn-group">' +
|
} else if (item.action === "add header") {
|
||||||
'<a href="#" data-item="' + encodeURI(item.id) + '" class="btn btn-xs btn-xs-half btn-info show_qid_info"><i class="bi bi-box-arrow-up-right"></i> ' + lang.show_item + '</a>' +
|
item.rspamdaction = '<span class="badge fs-6 bg-warning">' + lang.junk_folder + '</span>';
|
||||||
'<a href="#" data-action="delete_selected" data-id="del-single-qitem" data-api-url="delete/qitem" data-item="' + encodeURI(item.id) + '" class="btn btn-xs btn-xs-half btn-danger"><i class="bi bi-trash"></i> ' + lang.remove + '</a>' +
|
} else if (item.action === "rewrite subject") {
|
||||||
'</div>';
|
item.rspamdaction = '<span class="badge fs-6 bg-warning">' + lang.rewrite_subject + '</span>';
|
||||||
}
|
}
|
||||||
else {
|
if(item.notified > 0) {
|
||||||
item.action = '<div class="btn-group">' +
|
item.notified = '✔';
|
||||||
'<a href="#" data-item="' + encodeURI(item.id) + '" class="btn btn-xs btn-info show_qid_info"><i class="bi bi-file-earmark-text"></i> ' + lang.show_item + '</a>' +
|
} else {
|
||||||
'</div>';
|
item.notified = '✖';
|
||||||
}
|
}
|
||||||
item.chkbox = '<input type="checkbox" data-id="qitems" name="multi_select" value="' + item.id + '" />';
|
if (acl_data.login_as === 1) {
|
||||||
});
|
item.action = '<div class="btn-group">' +
|
||||||
|
'<a href="#" data-item="' + encodeURI(item.id) + '" class="btn btn-xs btn-xs-half btn-info show_qid_info"><i class="bi bi-box-arrow-up-right"></i> ' + lang.show_item + '</a>' +
|
||||||
return data;
|
'<a href="#" data-action="delete_selected" data-id="del-single-qitem" data-api-url="delete/qitem" data-item="' + encodeURI(item.id) + '" class="btn btn-xs btn-xs-half btn-danger"><i class="bi bi-trash"></i> ' + lang.remove + '</a>' +
|
||||||
}
|
'</div>';
|
||||||
},
|
}
|
||||||
columns: [
|
else {
|
||||||
{
|
item.action = '<div class="btn-group">' +
|
||||||
// placeholder, so checkbox will not block child row toggle
|
'<a href="#" data-item="' + encodeURI(item.id) + '" class="btn btn-xs btn-info show_qid_info"><i class="bi bi-file-earmark-text"></i> ' + lang.show_item + '</a>' +
|
||||||
title: '',
|
'</div>';
|
||||||
data: null,
|
}
|
||||||
searchable: false,
|
item.chkbox = '<input type="checkbox" data-id="qitems" name="multi_select" value="' + item.id + '" />';
|
||||||
orderable: false,
|
});
|
||||||
defaultContent: ''
|
|
||||||
},
|
return data;
|
||||||
{
|
}
|
||||||
title: '',
|
},
|
||||||
data: 'chkbox',
|
columns: [
|
||||||
searchable: false,
|
{
|
||||||
orderable: false,
|
// placeholder, so checkbox will not block child row toggle
|
||||||
defaultContent: ''
|
title: '',
|
||||||
},
|
data: null,
|
||||||
{
|
searchable: false,
|
||||||
title: 'ID',
|
orderable: false,
|
||||||
data: 'id',
|
defaultContent: ''
|
||||||
defaultContent: ''
|
},
|
||||||
},
|
{
|
||||||
{
|
title: '',
|
||||||
title: lang.qid,
|
data: 'chkbox',
|
||||||
data: 'qid',
|
searchable: false,
|
||||||
defaultContent: ''
|
orderable: false,
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: lang.sender,
|
{
|
||||||
data: 'sender',
|
title: 'ID',
|
||||||
defaultContent: ''
|
data: 'id',
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: lang.subj,
|
{
|
||||||
data: 'subject',
|
title: lang.qid,
|
||||||
defaultContent: ''
|
data: 'qid',
|
||||||
},
|
defaultContent: ''
|
||||||
{
|
},
|
||||||
title: lang.rspamd_result,
|
{
|
||||||
data: 'rspamdaction',
|
title: lang.sender,
|
||||||
defaultContent: ''
|
data: 'sender',
|
||||||
},
|
className: 'senders-mw220',
|
||||||
{
|
defaultContent: ''
|
||||||
title: lang.rcpt,
|
},
|
||||||
data: 'rcpt',
|
{
|
||||||
defaultContent: ''
|
title: lang.subj,
|
||||||
},
|
data: 'subject',
|
||||||
{
|
defaultContent: ''
|
||||||
title: lang.danger,
|
},
|
||||||
data: 'virus',
|
{
|
||||||
defaultContent: ''
|
title: lang.rspamd_result,
|
||||||
},
|
data: 'rspamdaction',
|
||||||
{
|
defaultContent: ''
|
||||||
title: lang.spam_score,
|
},
|
||||||
data: 'score',
|
{
|
||||||
defaultContent: ''
|
title: lang.rcpt,
|
||||||
},
|
data: 'rcpt',
|
||||||
{
|
defaultContent: ''
|
||||||
title: lang.notified,
|
},
|
||||||
data: 'notified',
|
{
|
||||||
defaultContent: ''
|
title: lang.danger,
|
||||||
},
|
data: 'virus',
|
||||||
{
|
defaultContent: ''
|
||||||
title: lang.received,
|
},
|
||||||
data: 'created',
|
{
|
||||||
defaultContent: '',
|
title: lang.spam_score,
|
||||||
createdCell: function(td, cellData) {
|
data: 'score',
|
||||||
$(td).attr({
|
defaultContent: ''
|
||||||
"data-order": cellData,
|
},
|
||||||
"data-sort": cellData
|
{
|
||||||
});
|
title: lang.notified,
|
||||||
|
data: 'notified',
|
||||||
var date = new Date(cellData ? cellData * 1000 : 0);
|
defaultContent: ''
|
||||||
var dateString = date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
},
|
||||||
$(td).html(dateString);
|
{
|
||||||
}
|
title: lang.received,
|
||||||
},
|
data: 'created',
|
||||||
{
|
defaultContent: '',
|
||||||
title: lang.action,
|
createdCell: function(td, cellData) {
|
||||||
data: 'action',
|
$(td).attr({
|
||||||
className: 'text-md-end dt-sm-head-hidden dt-body-right',
|
"data-order": cellData,
|
||||||
defaultContent: ''
|
"data-sort": cellData
|
||||||
},
|
});
|
||||||
]
|
|
||||||
});
|
var date = new Date(cellData ? cellData * 1000 : 0);
|
||||||
|
var dateString = date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
||||||
table.on('responsive-resize', function (e, datatable, columns){
|
$(td).html(dateString);
|
||||||
hideTableExpandCollapseBtn('#quarantinetable');
|
}
|
||||||
});
|
},
|
||||||
}
|
{
|
||||||
|
title: lang.action,
|
||||||
$('body').on('click', '.show_qid_info', function (e) {
|
data: 'action',
|
||||||
e.preventDefault();
|
className: 'text-md-end dt-sm-head-hidden dt-body-right',
|
||||||
var qitem = $(this).attr('data-item');
|
defaultContent: ''
|
||||||
var qError = $("#qid_error");
|
},
|
||||||
|
]
|
||||||
$('#qidDetailModal').modal('show');
|
});
|
||||||
qError.hide();
|
|
||||||
|
table.on('responsive-resize', function (e, datatable, columns){
|
||||||
$.ajax({
|
hideTableExpandCollapseBtn('#quarantinetable');
|
||||||
url: '/inc/ajax/qitem_details.php',
|
});
|
||||||
data: { id: qitem },
|
}
|
||||||
dataType: 'json',
|
|
||||||
success: function(data){
|
$('body').on('click', '.show_qid_info', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
$('[data-id="qitems_single"]').each(function(index) {
|
var qitem = $(this).attr('data-item');
|
||||||
$(this).attr("data-item", qitem);
|
var qError = $("#qid_error");
|
||||||
});
|
|
||||||
|
$('#qidDetailModal').modal('show');
|
||||||
$("#quick_download_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&eml', '_blank')");
|
qError.hide();
|
||||||
$("#quick_release_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&quick_release', '_blank')");
|
|
||||||
$("#quick_delete_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&quick_delete', '_blank')");
|
$.ajax({
|
||||||
|
url: '/inc/ajax/qitem_details.php',
|
||||||
$('#qid_detail_subj').text(data.subject);
|
data: { id: qitem },
|
||||||
$('#qid_detail_hfrom').text(data.header_from);
|
dataType: 'json',
|
||||||
$('#qid_detail_efrom').text(data.env_from);
|
success: function(data){
|
||||||
$('#qid_detail_score').html('');
|
|
||||||
$('#qid_detail_recipients').html('');
|
$('[data-id="qitems_single"]').each(function(index) {
|
||||||
$('#qid_detail_symbols').html('');
|
$(this).attr("data-item", qitem);
|
||||||
$('#qid_detail_fuzzy').html('');
|
});
|
||||||
if (typeof data.symbols !== 'undefined') {
|
|
||||||
data.symbols.sort(function (a, b) {
|
$("#quick_download_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&eml', '_blank')");
|
||||||
if (a.score === 0) return 1
|
$("#quick_release_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&quick_release', '_blank')");
|
||||||
if (b.score === 0) return -1
|
$("#quick_delete_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&quick_delete', '_blank')");
|
||||||
if (b.score < 0 && a.score < 0) {
|
|
||||||
return a.score - b.score
|
$('#qid_detail_subj').text(data.subject);
|
||||||
}
|
$('#qid_detail_hfrom').text(data.header_from);
|
||||||
if (b.score > 0 && a.score > 0) {
|
$('#qid_detail_efrom').text(data.env_from);
|
||||||
return b.score - a.score
|
$('#qid_detail_score').html('');
|
||||||
}
|
$('#qid_detail_recipients').html('');
|
||||||
return b.score - a.score
|
$('#qid_detail_symbols').html('');
|
||||||
})
|
$('#qid_detail_fuzzy').html('');
|
||||||
$.each(data.symbols, function (index, value) {
|
if (typeof data.symbols !== 'undefined') {
|
||||||
var highlightClass = ''
|
data.symbols.sort(function (a, b) {
|
||||||
if (value.score > 0) highlightClass = 'negative'
|
if (a.score === 0) return 1;
|
||||||
else if (value.score < 0) highlightClass = 'positive'
|
if (b.score === 0) return -1;
|
||||||
else highlightClass = 'neutral'
|
if (b.score < 0 && a.score < 0) {
|
||||||
$('#qid_detail_symbols').append('<span data-bs-toggle="tooltip" class="rspamd-symbol ' + highlightClass + '" title="' + (value.options ? value.options.join(', ') : '') + '">' + value.name + ' (<span class="score">' + value.score + '</span>)</span>');
|
return a.score - b.score;
|
||||||
});
|
}
|
||||||
$('[data-bs-toggle="tooltip"]').tooltip()
|
if (b.score > 0 && a.score > 0) {
|
||||||
}
|
return b.score - a.score;
|
||||||
if (typeof data.fuzzy_hashes === 'object' && data.fuzzy_hashes !== null && data.fuzzy_hashes.length !== 0) {
|
}
|
||||||
$.each(data.fuzzy_hashes, function (index, value) {
|
return b.score - a.score;
|
||||||
$('#qid_detail_fuzzy').append('<p style="font-family:monospace">' + value + '</p>');
|
})
|
||||||
});
|
$.each(data.symbols, function (index, value) {
|
||||||
} else {
|
var highlightClass = '';
|
||||||
$('#qid_detail_fuzzy').append('-');
|
if (value.score > 0) highlightClass = 'negative';
|
||||||
}
|
else if (value.score < 0) highlightClass = 'positive';
|
||||||
if (typeof data.score !== 'undefined' && typeof data.action !== 'undefined') {
|
else highlightClass = 'neutral';
|
||||||
if (data.action == "add header") {
|
$('#qid_detail_symbols').append('<span data-bs-toggle="tooltip" class="rspamd-symbol ' + highlightClass + '" title="' + (value.options ? value.options.join(', ') : '') + '">' + value.name + ' (<span class="score">' + value.score + '</span>)</span>');
|
||||||
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.junk_folder + '</span>');
|
});
|
||||||
} else if (data.action == "reject") {
|
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||||
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-danger"><b>' + data.score + '</b> - ' + lang.rejected + '</span>');
|
}
|
||||||
} else if (data.action == "rewrite subject") {
|
if (typeof data.fuzzy_hashes === 'object' && data.fuzzy_hashes !== null && data.fuzzy_hashes.length !== 0) {
|
||||||
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.rewrite_subject + '</span>');
|
$.each(data.fuzzy_hashes, function (index, value) {
|
||||||
}
|
$('#qid_detail_fuzzy').append('<p style="font-family:monospace">' + value + '</p>');
|
||||||
}
|
});
|
||||||
if (typeof data.recipients !== 'undefined') {
|
} else {
|
||||||
$.each(data.recipients, function(index, value) {
|
$('#qid_detail_fuzzy').append('-');
|
||||||
var elem = $('<span class="mail-address-item"></span>');
|
}
|
||||||
elem.text(value.address + ' (' + value.type.toUpperCase() + ')');
|
if (typeof data.score !== 'undefined' && typeof data.action !== 'undefined') {
|
||||||
$('#qid_detail_recipients').append(elem);
|
if (data.action == "add header") {
|
||||||
});
|
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.junk_folder + '</span>');
|
||||||
}
|
} else if (data.action == "reject") {
|
||||||
$('#qid_detail_text').text(data.text_plain);
|
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-danger"><b>' + data.score + '</b> - ' + lang.rejected + '</span>');
|
||||||
$('#qid_detail_text_from_html').text(data.text_html);
|
} else if (data.action == "rewrite subject") {
|
||||||
var qAtts = $("#qid_detail_atts");
|
$('#qid_detail_score').append('<span class="label-rspamd-action badge fs-6 bg-warning"><b>' + data.score + '</b> - ' + lang.rewrite_subject + '</span>');
|
||||||
if (typeof data.attachments !== 'undefined') {
|
}
|
||||||
qAtts.text('');
|
}
|
||||||
$.each(data.attachments, function(index, value) {
|
if (typeof data.recipients !== 'undefined') {
|
||||||
qAtts.append(
|
$.each(data.recipients, function(index, value) {
|
||||||
'<p><a href="/inc/ajax/qitem_details.php?id=' + qitem + '&att=' + index + '" target="_blank">' + value[0] + '</a> (' + value[1] + ')' +
|
var elem = $('<span class="mail-address-item"></span>');
|
||||||
' - <small><a href="' + value[3] + '" target="_blank">' + lang.check_hash + '</a></small></p>'
|
elem.text(value.address + ' (' + value.type.toUpperCase() + ')');
|
||||||
);
|
$('#qid_detail_recipients').append(elem);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
$('#qid_detail_text').text(data.text_plain);
|
||||||
qAtts.text('-');
|
$('#qid_detail_text_from_html').text(data.text_html);
|
||||||
}
|
var qAtts = $("#qid_detail_atts");
|
||||||
},
|
if (typeof data.attachments !== 'undefined') {
|
||||||
error: function(data){
|
qAtts.text('');
|
||||||
if (typeof data.error !== 'undefined') {
|
$.each(data.attachments, function(index, value) {
|
||||||
$('#qid_detail_subj').text('-');
|
qAtts.append(
|
||||||
$('#qid_detail_hfrom').text('-');
|
'<p><a href="/inc/ajax/qitem_details.php?id=' + qitem + '&att=' + index + '" target="_blank">' + value[0] + '</a> (' + value[1] + ')' +
|
||||||
$('#qid_detail_efrom').text('-');
|
' - <small><a href="' + value[3] + '" target="_blank">' + lang.check_hash + '</a></small></p>'
|
||||||
$('#qid_detail_score').html('-');
|
);
|
||||||
$('#qid_detail_recipients').html('-');
|
});
|
||||||
$('#qid_detail_symbols').html('-');
|
}
|
||||||
$('#qid_detail_fuzzy').html('-');
|
else {
|
||||||
$('#qid_detail_text').text('-');
|
qAtts.text('-');
|
||||||
$('#qid_detail_text_from_html').text('-');
|
}
|
||||||
qError.text("Error loading quarantine item");
|
},
|
||||||
qError.show();
|
error: function(data){
|
||||||
}
|
if (typeof data.error !== 'undefined') {
|
||||||
}
|
$('#qid_detail_subj').text('-');
|
||||||
});
|
$('#qid_detail_hfrom').text('-');
|
||||||
});
|
$('#qid_detail_efrom').text('-');
|
||||||
|
$('#qid_detail_score').html('-');
|
||||||
$('body').on('click', 'span.footable-toggle', function () {
|
$('#qid_detail_recipients').html('-');
|
||||||
event.stopPropagation();
|
$('#qid_detail_symbols').html('-');
|
||||||
})
|
$('#qid_detail_fuzzy').html('-');
|
||||||
|
$('#qid_detail_text').text('-');
|
||||||
// Initial table drawings
|
$('#qid_detail_text_from_html').text('-');
|
||||||
draw_quarantine_table();
|
qError.text("Error loading quarantine item");
|
||||||
|
qError.show();
|
||||||
|
}
|
||||||
function hideTableExpandCollapseBtn(table){
|
}
|
||||||
if ($(table).hasClass('collapsed'))
|
});
|
||||||
$(".table_collapse_option").show();
|
});
|
||||||
else
|
|
||||||
$(".table_collapse_option").hide();
|
$('body').on('click', 'span.footable-toggle', function () {
|
||||||
}
|
event.stopPropagation();
|
||||||
});
|
})
|
||||||
|
|
||||||
|
// Initial table drawings
|
||||||
|
draw_quarantine_table();
|
||||||
|
|
||||||
|
function hideTableExpandCollapseBtn(table){
|
||||||
|
if ($(table).hasClass('collapsed'))
|
||||||
|
$(".table_collapse_option").show();
|
||||||
|
else
|
||||||
|
$(".table_collapse_option").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
@ -1,127 +1,128 @@
|
|||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
|
|
||||||
$(".refresh_table").on('click', function(e) {
|
$(".refresh_table").on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var table_name = $(this).data('table');
|
var table_name = $(this).data('table');
|
||||||
$('#' + table_name).DataTable().ajax.reload();
|
$('#' + table_name).DataTable().ajax.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
||||||
|
|
||||||
// Queue item
|
// Queue item
|
||||||
$('#showQueuedMsg').on('show.bs.modal', function (e) {
|
$('#showQueuedMsg').on('show.bs.modal', function (e) {
|
||||||
$('#queue_msg_content').text(lang.loading);
|
$('#queue_msg_content').text(lang.loading);
|
||||||
button = $(e.relatedTarget)
|
button = $(e.relatedTarget)
|
||||||
if (button != null) {
|
if (button != null) {
|
||||||
$('#queue_id').text(button.data('queue-id'));
|
$('#queue_id').text(button.data('queue-id'));
|
||||||
}
|
|
||||||
$.ajax({
|
|
||||||
type: 'GET',
|
|
||||||
url: '/api/v1/get/postcat/' + button.data('queue-id'),
|
|
||||||
dataType: 'text',
|
|
||||||
complete: function (data) {
|
|
||||||
$('#queue_msg_content').text(data.responseText);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
function draw_queue() {
|
|
||||||
// just recalc width if instance already exists
|
|
||||||
if ($.fn.DataTable.isDataTable('#queuetable') ) {
|
|
||||||
$('#queuetable').DataTable().columns.adjust().responsive.recalc();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
$.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
url: '/api/v1/get/postcat/' + button.data('queue-id'),
|
||||||
|
dataType: 'text',
|
||||||
|
complete: function (data) {
|
||||||
|
$('#queue_msg_content').text(data.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
$('#queuetable').DataTable({
|
function draw_queue() {
|
||||||
responsive: true,
|
// just recalc width if instance already exists
|
||||||
processing: true,
|
if ($.fn.DataTable.isDataTable('#queuetable') ) {
|
||||||
serverSide: false,
|
$('#queuetable').DataTable().columns.adjust().responsive.recalc();
|
||||||
stateSave: true,
|
return;
|
||||||
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
}
|
||||||
"tr" +
|
|
||||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
$('#queuetable').DataTable({
|
||||||
language: lang_datatables,
|
responsive: true,
|
||||||
ajax: {
|
processing: true,
|
||||||
type: "GET",
|
serverSide: false,
|
||||||
url: "/api/v1/get/mailq/all",
|
stateSave: true,
|
||||||
dataSrc: function(data){
|
pageLength: pagination_size,
|
||||||
$.each(data, function (i, item) {
|
dom: "<'row'<'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'l>>" +
|
||||||
item.chkbox = '<input type="checkbox" data-id="mailqitems" name="multi_select" value="' + item.queue_id + '" />';
|
"tr" +
|
||||||
rcpts = $.map(item.recipients, function(i) {
|
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||||
return escapeHtml(i);
|
language: lang_datatables,
|
||||||
});
|
ajax: {
|
||||||
item.recipients = rcpts.join('<hr style="margin:1px!important">');
|
type: "GET",
|
||||||
item.action = '<div class="btn-group">' +
|
url: "/api/v1/get/mailq/all",
|
||||||
'<a href="#" data-bs-toggle="modal" data-bs-target="#showQueuedMsg" data-queue-id="' + encodeURI(item.queue_id) + '" class="btn btn-xs btn-secondary">' + lang.show_message + '</a>' +
|
dataSrc: function(data){
|
||||||
|
$.each(data, function (i, item) {
|
||||||
|
item.chkbox = '<input type="checkbox" data-id="mailqitems" name="multi_select" value="' + item.queue_id + '" />';
|
||||||
|
rcpts = $.map(item.recipients, function(i) {
|
||||||
|
return escapeHtml(i);
|
||||||
|
});
|
||||||
|
item.recipients = rcpts.join('<hr style="margin:1px!important">');
|
||||||
|
item.action = '<div class="btn-group">' +
|
||||||
|
'<a href="#" data-bs-toggle="modal" data-bs-target="#showQueuedMsg" data-queue-id="' + encodeURI(item.queue_id) + '" class="btn btn-xs btn-secondary">' + lang.show_message + '</a>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
// placeholder, so checkbox will not block child row toggle
|
// placeholder, so checkbox will not block child row toggle
|
||||||
title: '',
|
title: '',
|
||||||
data: null,
|
data: null,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
orderable: false,
|
orderable: false,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '',
|
title: '',
|
||||||
data: 'chkbox',
|
data: 'chkbox',
|
||||||
searchable: false,
|
searchable: false,
|
||||||
orderable: false,
|
orderable: false,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'QID',
|
title: 'QID',
|
||||||
data: 'queue_id',
|
data: 'queue_id',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Queue',
|
title: 'Queue',
|
||||||
data: 'queue_name',
|
data: 'queue_name',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang_admin.arrival_time,
|
title: lang_admin.arrival_time,
|
||||||
data: 'arrival_time',
|
data: 'arrival_time',
|
||||||
defaultContent: '',
|
defaultContent: '',
|
||||||
render: function (data, type){
|
render: function (data, type){
|
||||||
var date = new Date(data ? data * 1000 : 0);
|
var date = new Date(data ? data * 1000 : 0);
|
||||||
return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang_admin.message_size,
|
title: lang_admin.message_size,
|
||||||
data: 'message_size',
|
data: 'message_size',
|
||||||
defaultContent: '',
|
defaultContent: '',
|
||||||
render: function (data, type){
|
render: function (data, type){
|
||||||
return humanFileSize(data);
|
return humanFileSize(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang_admin.sender,
|
title: lang_admin.sender,
|
||||||
data: 'sender',
|
data: 'sender',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang_admin.recipients,
|
title: lang_admin.recipients,
|
||||||
data: 'recipients',
|
data: 'recipients',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang_admin.action,
|
title: lang_admin.action,
|
||||||
data: 'action',
|
data: 'action',
|
||||||
className: 'text-md-end dt-sm-head-hidden dt-body-right',
|
className: 'text-md-end dt-sm-head-hidden dt-body-right',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_queue();
|
draw_queue();
|
||||||
|
|
||||||
})
|
})
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> <!-- /col-md-12 -->
|
</div> <!-- /col-md-12 -->
|
||||||
</div> <!-- /row -->
|
</div> <!-- /row -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include 'modals/admin.twig' %}
|
{% include 'modals/admin.twig' %}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ var lang = {{ lang_admin|raw }};
|
|||||||
var lang_datatables = {{ lang_datatables|raw }};
|
var lang_datatables = {{ lang_datatables|raw }};
|
||||||
var admin_username = '{{ mailcow_cc_username }}';
|
var admin_username = '{{ mailcow_cc_username }}';
|
||||||
var csrf_token = '{{ csrf_token }}';
|
var csrf_token = '{{ csrf_token }}';
|
||||||
var pagination_size = '{{ pagination_size }}';
|
var pagination_size = Math.trunc('{{ pagination_size }}');
|
||||||
var log_pagination_size = '{{ log_pagination_size }}';
|
var log_pagination_size = Math.trunc('{{ log_pagination_size }}');
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -46,7 +46,7 @@
|
|||||||
<div class="col-sm-3 col-5 text-end">{{ lang.fido2.known_ids }}:</div>
|
<div class="col-sm-3 col-5 text-end">{{ lang.fido2.known_ids }}:</div>
|
||||||
<div class="col-sm-9 col-7">
|
<div class="col-sm-9 col-7">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-hover table-condensed" id="fido2_keys">
|
<table class="table table-striped table-hover table-condensed w-100" id="fido2_keys">
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th style="min-width:240px;text-align: right">{{ lang.admin.action }}</th>
|
<th style="min-width:240px;text-align: right">{{ lang.admin.action }}</th>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
var lang_user = {{ lang_user|raw }};
|
var lang_user = {{ lang_user|raw }};
|
||||||
var lang_datatables = {{ lang_datatables|raw }};
|
var lang_datatables = {{ lang_datatables|raw }};
|
||||||
var csrf_token = '{{ csrf_token }}';
|
var csrf_token = '{{ csrf_token }}';
|
||||||
var pagination_size = '{{ pagination_size }}';
|
var pagination_size = Math.trunc('{{ pagination_size }}');
|
||||||
var table_for_domain = '{{ domain }}';
|
var table_for_domain = '{{ domain }}';
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
var lang_rl = {{ lang_rl|raw }};
|
var lang_rl = {{ lang_rl|raw }};
|
||||||
var lang_datatables = {{ lang_datatables|raw }};
|
var lang_datatables = {{ lang_datatables|raw }};
|
||||||
var csrf_token = '{{ csrf_token }}';
|
var csrf_token = '{{ csrf_token }}';
|
||||||
var pagination_size = '{{ pagination_size }}';
|
var pagination_size = Math.trunc('{{ pagination_size }}');
|
||||||
var role = '{{ role }}';
|
var role = '{{ role }}';
|
||||||
var is_dual = {{ is_dual }};
|
var is_dual = {{ is_dual }};
|
||||||
var ALLOW_ADMIN_EMAIL_LOGIN = {{ allow_admin_email_login }};
|
var ALLOW_ADMIN_EMAIL_LOGIN = {{ allow_admin_email_login }};
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
<table id="quarantinetable" class="table table-striped"></table>
|
<table id="quarantinetable" class="table table-striped w-100"></table>
|
||||||
<div class="mass-actions-quarantine mt-4">
|
<div class="mass-actions-quarantine mt-4">
|
||||||
<div class="btn-group" data-acl="{{ acl.quarantine }}">
|
<div class="btn-group" data-acl="{{ acl.quarantine }}">
|
||||||
<a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" id="toggle_multi_select_all" data-id="qitems" href="#"><i class="bi bi-check-all"></i> {{ lang.quarantine.toggle_all }}</a>
|
<a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" id="toggle_multi_select_all" data-id="qitems" href="#"><i class="bi bi-check-all"></i> {{ lang.quarantine.toggle_all }}</a>
|
||||||
@ -66,7 +66,7 @@ var acl = '{{ acl_json|raw }}';
|
|||||||
var lang = {{ lang_quarantine|raw }};
|
var lang = {{ lang_quarantine|raw }};
|
||||||
var lang_datatables = {{ lang_datatables|raw }};
|
var lang_datatables = {{ lang_datatables|raw }};
|
||||||
var csrf_token = '{{ csrf_token }}';
|
var csrf_token = '{{ csrf_token }}';
|
||||||
var pagination_size = '{{ pagination_size }}';
|
var pagination_size = Math.trunc('{{ pagination_size }}');
|
||||||
var role = '{{ role }}';
|
var role = '{{ role }}';
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
var lang = {{ lang_queue|raw }};
|
var lang = {{ lang_queue|raw }};
|
||||||
var lang_datatables = {{ lang_datatables|raw }};
|
var lang_datatables = {{ lang_datatables|raw }};
|
||||||
var csrf_token = '{{ csrf_token }}';
|
var csrf_token = '{{ csrf_token }}';
|
||||||
var pagination_size = '{{ pagination_size }}';
|
var pagination_size = Math.trunc('{{ pagination_size }}');
|
||||||
var table_for_domain = '{{ domain }}';
|
var table_for_domain = '{{ domain }}';
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
var acl = '{{ acl_json|raw }}';
|
var acl = '{{ acl_json|raw }}';
|
||||||
var lang = {{ lang_user|raw }};
|
var lang = {{ lang_user|raw }};
|
||||||
var csrf_token = '{{ csrf_token }}';
|
var csrf_token = '{{ csrf_token }}';
|
||||||
var pagination_size = '{{ pagination_size }}';
|
var pagination_size = Math.trunc('{{ pagination_size }}');
|
||||||
var mailcow_cc_username = '{{ mailcow_cc_username }}';
|
var mailcow_cc_username = '{{ mailcow_cc_username }}';
|
||||||
var user_spam_score = [{{ user_spam_score }}];
|
var user_spam_score = [{{ user_spam_score }}];
|
||||||
var lang_datatables = {{ lang_datatables|raw }};
|
var lang_datatables = {{ lang_datatables|raw }};
|
||||||
|
Loading…
Reference in New Issue
Block a user