]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Normalize IPv4 for column sorting 4766/head
authormoisseev <moiseev@mezonplus.ru>
Sun, 31 Dec 2023 16:04:09 +0000 (19:04 +0300)
committermoisseev <moiseev@mezonplus.ru>
Sun, 31 Dec 2023 16:04:09 +0000 (19:04 +0300)
interface/js/app/libft.js

index 463ddec1637a7cb2d24d7c12eb931e98967dd98e..c69f74d2ba56042945b59d8f4cd669c50c7e8fc0 100644 (file)
@@ -69,7 +69,9 @@ define(["jquery", "app/common", "footable"],
                 style: {
                     "minWidth": "calc(7.6em + 8px)",
                     "word-break": "break-all"
-                }
+                },
+                // Normalize IPv4
+                sortValue: (ip) => ((typeof ip === "string") ? ip.split(".").map((x) => x.padStart(3, "0")).join("") : "0")
             }, {
                 name: "sender_mime",
                 title: "[Envelope From] From",