aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
authormoisseev <moiseev@mezonplus.ru>2023-12-31 19:04:09 +0300
committermoisseev <moiseev@mezonplus.ru>2023-12-31 19:04:09 +0300
commitd76564979e9ac10f59a8f23e68fccc1bb0bcca90 (patch)
tree4cbbeb39adce9ba3514a6ca7925a40cb1d956162 /interface
parent6ef041641d9ca01ea9ae9a3547f41652282c939f (diff)
downloadrspamd-d76564979e9ac10f59a8f23e68fccc1bb0bcca90.tar.gz
rspamd-d76564979e9ac10f59a8f23e68fccc1bb0bcca90.zip
[WebUI] Normalize IPv4 for column sorting
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/libft.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/interface/js/app/libft.js b/interface/js/app/libft.js
index 463ddec16..c69f74d2b 100644
--- a/interface/js/app/libft.js
+++ b/interface/js/app/libft.js
@@ -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",