Browse Source

[Minor] Change FooTable breakpoints

to match Bootstrap 5
pull/4878/head
moisseev 1 month ago
parent
commit
74cef6faca

+ 8
- 0
interface/js/app/common.js View File

($, NProgress) => { ($, NProgress) => {
"use strict"; "use strict";
const ui = { const ui = {
breakpoints: {
xs: 0,
sm: 576,
md: 768,
lg: 992,
xl: 1200,
xxl: 1400
},
chartLegend: [ chartLegend: [
{label: "reject", color: "#FF0000"}, {label: "reject", color: "#FF0000"},
{label: "soft reject", color: "#BF8040"}, {label: "soft reject", color: "#BF8040"},

+ 1
- 0
interface/js/app/graph.js View File



function initSummaryTable(rows, unit) { function initSummaryTable(rows, unit) {
common.tables.rrd_summary = FooTable.init("#rrd-table", { common.tables.rrd_summary = FooTable.init("#rrd-table", {
breakpoints: common.breakpoints,
cascade: true, cascade: true,
sorting: { sorting: {
enabled: true enabled: true

+ 8
- 7
interface/js/app/history.js View File

}, { }, {
name: "ip", name: "ip",
title: "IP address", title: "IP address",
breakpoints: "sm",
breakpoints: "md",
style: {width: 150, maxWidth: 150} style: {width: 150, maxWidth: 150}
}, { }, {
name: "action", name: "action",
}, { }, {
name: "size", name: "size",
title: "Message size", title: "Message size",
breakpoints: "sm",
breakpoints: "md",
style: {width: 120, maxWidth: 120}, style: {width: 120, maxWidth: 120},
formatter: libft.formatBytesIEC formatter: libft.formatBytesIEC
}, { }, {
name: "scan_time", name: "scan_time",
title: "Scan time", title: "Scan time",
breakpoints: "sm",
breakpoints: "md",
style: {maxWidth: 80}, style: {maxWidth: 80},
sortValue: function (val) { return Number(val); } sortValue: function (val) { return Number(val); }
}, { }, {
}, { }, {
name: "user", name: "user",
title: "Authenticated user", title: "Authenticated user",
breakpoints: "sm",
breakpoints: "md",
style: {width: 200, maxWidth: 200} style: {width: 200, maxWidth: 200}
}]; }];
} }


function initErrorsTable(rows) { function initErrorsTable(rows) {
common.tables.errors = FooTable.init("#errorsLog", { common.tables.errors = FooTable.init("#errorsLog", {
breakpoints: common.breakpoints,
cascade: true, cascade: true,
columns: [ columns: [
{sorted: true, {sorted: true,
sortValue: function (val) { return Number(val.options.sortValue); }}, sortValue: function (val) { return Number(val.options.sortValue); }},
{name: "type", {name: "type",
title: "Worker type", title: "Worker type",
breakpoints: "sm",
breakpoints: "md",
style: {width: 150, maxWidth: 150}}, style: {width: 150, maxWidth: 150}},
{name: "pid", {name: "pid",
title: "PID", title: "PID",
breakpoints: "sm",
breakpoints: "md",
style: {width: 110, maxWidth: 110}}, style: {width: 110, maxWidth: 110}},
{name: "module", title: "Module"}, {name: "module", title: "Module"},
{name: "id", title: "Internal ID"}, {name: "id", title: "Internal ID"},
{name: "message", title: "Message", breakpoints: "sm"},
{name: "message", title: "Message", breakpoints: "md"},
], ],
rows: rows, rows: rows,
paging: { paging: {

+ 10
- 9
interface/js/app/libft.js View File

}, { }, {
name: "file", name: "file",
title: "File name", title: "File name",
breakpoints: "xs",
breakpoints: "sm",
sortValue: (val) => ((typeof val === "undefined") ? "" : val) sortValue: (val) => ((typeof val === "undefined") ? "" : val)
}, { }, {
name: "ip", name: "ip",
title: "IP address", title: "IP address",
breakpoints: "md",
breakpoints: "lg",
style: { style: {
"minWidth": "calc(14ch + 8px)", "minWidth": "calc(14ch + 8px)",
"word-break": "break-all" "word-break": "break-all"
}, { }, {
name: "sender_mime", name: "sender_mime",
title: "[Envelope From] From", title: "[Envelope From] From",
breakpoints: "md",
breakpoints: "lg",
style: { style: {
"minWidth": 100, "minWidth": 100,
"maxWidth": 200, "maxWidth": 200,
}, { }, {
name: "rcpt_mime_short", name: "rcpt_mime_short",
title: "[Envelope To] To/Cc/Bcc", title: "[Envelope To] To/Cc/Bcc",
breakpoints: "md",
breakpoints: "lg",
filterable: false, filterable: false,
classes: "d-none d-xl-table-cell", classes: "d-none d-xl-table-cell",
style: { style: {
}, { }, {
name: "subject", name: "subject",
title: "Subject", title: "Subject",
breakpoints: "md",
breakpoints: "lg",
style: { style: {
"word-break": "break-all", "word-break": "break-all",
"minWidth": 150 "minWidth": 150
}, { }, {
name: "passthrough_module", name: "passthrough_module",
title: '<div title="The module that has set the pre-result"><nobr>Pass-through</nobr> module</div>', title: '<div title="The module that has set the pre-result"><nobr>Pass-through</nobr> module</div>',
breakpoints: "xs",
breakpoints: "sm",
style: {minWidth: 98, maxWidth: 98}, style: {minWidth: 98, maxWidth: 98},
sortValue: (val) => ((typeof val === "undefined") ? "" : val) sortValue: (val) => ((typeof val === "undefined") ? "" : val)
}, { }, {
}, { }, {
name: "size", name: "size",
title: "Msg size", title: "Msg size",
breakpoints: "md",
breakpoints: "lg",
style: {minwidth: 50}, style: {minwidth: 50},
formatter: ui.formatBytesIEC formatter: ui.formatBytesIEC
}, { }, {
name: "time_real", name: "time_real",
title: "Scan time", title: "Scan time",
breakpoints: "md",
breakpoints: "lg",
style: {maxWidth: 72}, style: {maxWidth: 72},
sortValue: function (val) { return Number(val); } sortValue: function (val) { return Number(val); }
}, { }, {
}, { }, {
name: "user", name: "user",
title: "Authenticated user", title: "Authenticated user",
breakpoints: "md",
breakpoints: "lg",
style: { style: {
"minWidth": 100, "minWidth": 100,
"maxWidth": 130, "maxWidth": 130,
: columnsDefault.map((column) => column); : columnsDefault.map((column) => column);


common.tables[table] = FooTable.init("#historyTable_" + table, { common.tables[table] = FooTable.init("#historyTable_" + table, {
breakpoints: common.breakpoints,
cascade: true, cascade: true,
columns: columns, columns: columns,
rows: items, rows: items,

+ 4
- 3
interface/js/app/symbols.js View File

/* eslint-enable consistent-this, no-underscore-dangle, one-var-declaration-per-line */ /* eslint-enable consistent-this, no-underscore-dangle, one-var-declaration-per-line */


common.tables.symbols = FooTable.init("#symbolsTable", { common.tables.symbols = FooTable.init("#symbolsTable", {
breakpoints: common.breakpoints,
cascade: true, cascade: true,
columns: [ columns: [
{sorted: true, direction: "ASC", name: "group", title: "Group"}, {sorted: true, direction: "ASC", name: "group", title: "Group"},
{name: "symbol", title: "Symbol"}, {name: "symbol", title: "Symbol"},
{name: "description", title: "Description", breakpoints: "sm"},
{name: "description", title: "Description", breakpoints: "md"},
{name: "weight", title: "Score"}, {name: "weight", title: "Score"},
{name: "frequency", {name: "frequency",
title: "Frequency", title: "Frequency",
breakpoints: "sm",
breakpoints: "md",
sortValue: function (value) { return Number(value).toFixed(2); }}, sortValue: function (value) { return Number(value).toFixed(2); }},
{name: "time", title: "Avg. time", breakpoints: "sm"},
{name: "time", title: "Avg. time", breakpoints: "md"},
], ],
rows: items[0], rows: items[0],
paging: { paging: {

Loading…
Cancel
Save