]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Change FooTable breakpoints 4878/head
authormoisseev <moiseev@mezonplus.ru>
Sun, 17 Mar 2024 16:50:37 +0000 (19:50 +0300)
committermoisseev <moiseev@mezonplus.ru>
Sun, 17 Mar 2024 16:50:37 +0000 (19:50 +0300)
to match Bootstrap 5

interface/js/app/common.js
interface/js/app/graph.js
interface/js/app/history.js
interface/js/app/libft.js
interface/js/app/symbols.js

index 1fc723542135d87cadc34256090a461861a46f72..ace4bbba17a5ec935bbd3034f9a5d369a64887ca 100644 (file)
@@ -4,6 +4,14 @@ define(["jquery", "nprogress"],
     ($, NProgress) => {
         "use strict";
         const ui = {
+            breakpoints: {
+                xs: 0,
+                sm: 576,
+                md: 768,
+                lg: 992,
+                xl: 1200,
+                xxl: 1400
+            },
             chartLegend: [
                 {label: "reject", color: "#FF0000"},
                 {label: "soft reject", color: "#BF8040"},
index 5b92c6df6146fee9d094b3145013e538b746efe7..4d10b95d8ead6beb1ad989180064d94c3e970acb 100644 (file)
@@ -128,6 +128,7 @@ define(["jquery", "app/common", "d3evolution", "d3pie", "d3", "footable"],
 
             function initSummaryTable(rows, unit) {
                 common.tables.rrd_summary = FooTable.init("#rrd-table", {
+                    breakpoints: common.breakpoints,
                     cascade: true,
                     sorting: {
                         enabled: true
index 97a759c9b1374f2c5e7a6039002df4583e2a72c1..6366f672388da89d771152aeb5ba0ce1295ab223 100644 (file)
@@ -73,7 +73,7 @@ define(["jquery", "app/common", "app/libft", "footable"],
             }, {
                 name: "ip",
                 title: "IP address",
-                breakpoints: "sm",
+                breakpoints: "md",
                 style: {width: 150, maxWidth: 150}
             }, {
                 name: "action",
@@ -92,13 +92,13 @@ define(["jquery", "app/common", "app/libft", "footable"],
             }, {
                 name: "size",
                 title: "Message size",
-                breakpoints: "sm",
+                breakpoints: "md",
                 style: {width: 120, maxWidth: 120},
                 formatter: libft.formatBytesIEC
             }, {
                 name: "scan_time",
                 title: "Scan time",
-                breakpoints: "sm",
+                breakpoints: "md",
                 style: {maxWidth: 80},
                 sortValue: function (val) { return Number(val); }
             }, {
@@ -110,7 +110,7 @@ define(["jquery", "app/common", "app/libft", "footable"],
             }, {
                 name: "user",
                 title: "Authenticated user",
-                breakpoints: "sm",
+                breakpoints: "md",
                 style: {width: 200, maxWidth: 200}
             }];
         }
@@ -208,6 +208,7 @@ define(["jquery", "app/common", "app/libft", "footable"],
 
         function initErrorsTable(rows) {
             common.tables.errors = FooTable.init("#errorsLog", {
+                breakpoints: common.breakpoints,
                 cascade: true,
                 columns: [
                     {sorted: true,
@@ -218,15 +219,15 @@ define(["jquery", "app/common", "app/libft", "footable"],
                         sortValue: function (val) { return Number(val.options.sortValue); }},
                     {name: "type",
                         title: "Worker type",
-                        breakpoints: "sm",
+                        breakpoints: "md",
                         style: {width: 150, maxWidth: 150}},
                     {name: "pid",
                         title: "PID",
-                        breakpoints: "sm",
+                        breakpoints: "md",
                         style: {width: 110, maxWidth: 110}},
                     {name: "module", title: "Module"},
                     {name: "id", title: "Internal ID"},
-                    {name: "message", title: "Message", breakpoints: "sm"},
+                    {name: "message", title: "Message", breakpoints: "md"},
                 ],
                 rows: rows,
                 paging: {
index a3d65578059a5b1f28c263f09de73e056a5cea88..e45a1718d56a7fd98f3ffda1751c5bd529304b85 100644 (file)
@@ -66,12 +66,12 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "file",
                 title: "File name",
-                breakpoints: "xs",
+                breakpoints: "sm",
                 sortValue: (val) => ((typeof val === "undefined") ? "" : val)
             }, {
                 name: "ip",
                 title: "IP address",
-                breakpoints: "md",
+                breakpoints: "lg",
                 style: {
                     "minWidth": "calc(14ch + 8px)",
                     "word-break": "break-all"
@@ -81,7 +81,7 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "sender_mime",
                 title: "[Envelope From] From",
-                breakpoints: "md",
+                breakpoints: "lg",
                 style: {
                     "minWidth": 100,
                     "maxWidth": 200,
@@ -90,7 +90,7 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "rcpt_mime_short",
                 title: "[Envelope To] To/Cc/Bcc",
-                breakpoints: "md",
+                breakpoints: "lg",
                 filterable: false,
                 classes: "d-none d-xl-table-cell",
                 style: {
@@ -106,7 +106,7 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "subject",
                 title: "Subject",
-                breakpoints: "md",
+                breakpoints: "lg",
                 style: {
                     "word-break": "break-all",
                     "minWidth": 150
@@ -118,7 +118,7 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "passthrough_module",
                 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},
                 sortValue: (val) => ((typeof val === "undefined") ? "" : val)
             }, {
@@ -149,13 +149,13 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "size",
                 title: "Msg size",
-                breakpoints: "md",
+                breakpoints: "lg",
                 style: {minwidth: 50},
                 formatter: ui.formatBytesIEC
             }, {
                 name: "time_real",
                 title: "Scan time",
-                breakpoints: "md",
+                breakpoints: "lg",
                 style: {maxWidth: 72},
                 sortValue: function (val) { return Number(val); }
             }, {
@@ -168,7 +168,7 @@ define(["jquery", "app/common", "footable"],
             }, {
                 name: "user",
                 title: "Authenticated user",
-                breakpoints: "md",
+                breakpoints: "lg",
                 style: {
                     "minWidth": 100,
                     "maxWidth": 130,
@@ -326,6 +326,7 @@ define(["jquery", "app/common", "footable"],
                 : columnsDefault.map((column) => column);
 
             common.tables[table] = FooTable.init("#historyTable_" + table, {
+                breakpoints: common.breakpoints,
                 cascade: true,
                 columns: columns,
                 rows: items,
index 203cf0d14e2ff23587c1b04cac47a3c971de4415..aa1403101161d3948024d7678b6e24a947e1e60d 100644 (file)
@@ -186,17 +186,18 @@ define(["jquery", "app/common", "footable"],
                     /* eslint-enable consistent-this, no-underscore-dangle, one-var-declaration-per-line */
 
                     common.tables.symbols = FooTable.init("#symbolsTable", {
+                        breakpoints: common.breakpoints,
                         cascade: true,
                         columns: [
                             {sorted: true, direction: "ASC", name: "group", title: "Group"},
                             {name: "symbol", title: "Symbol"},
-                            {name: "description", title: "Description", breakpoints: "sm"},
+                            {name: "description", title: "Description", breakpoints: "md"},
                             {name: "weight", title: "Score"},
                             {name: "frequency",
                                 title: "Frequency",
-                                breakpoints: "sm",
+                                breakpoints: "md",
                                 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],
                         paging: {