From: Alexander Moisseev Date: Fri, 2 May 2025 15:38:30 +0000 (+0300) Subject: [WebUI] Add `Delete hash` button X-Git-Tag: 3.12.0~32^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5454%2Fhead;p=thirdparty%2Frspamd.git [WebUI] Add `Delete hash` button - Add `Delete hash` button - Rename `Upload FUZZY` button to `Add hash` --- diff --git a/interface/index.html b/interface/index.html index a759ac48f9..8329a74ddd 100644 --- a/interface/index.html +++ b/interface/index.html @@ -488,7 +488,7 @@
-

Learn Fuzzy storage:

+

Fuzzy hash storage management:

@@ -498,7 +498,8 @@
- + +
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js index a484a41aac..d851962964 100644 --- a/interface/js/app/upload.js +++ b/interface/js/app/upload.js @@ -42,8 +42,10 @@ define(["jquery", "app/common", "app/libft"], url = "learnspam"; } else if (source === "ham") { url = "learnham"; - } else if (source === "fuzzy") { + } else if (source === "fuzzyadd") { url = "fuzzyadd"; + } else if (source === "fuzzydel") { + url = "fuzzydel"; } else if (source === "scan") { url = "checkv2"; } @@ -245,11 +247,15 @@ define(["jquery", "app/common", "app/libft"], getFuzzyHashes(data); } else { let headers = {}; - if (source === "fuzzy") { + if (source === "fuzzyadd") { headers = { flag: $("#fuzzyFlagText").val(), weight: $("#fuzzyWeightText").val() }; + } else if (source === "fuzzydel") { + headers = { + flag: $("#fuzzyFlagText").val(), + }; } uploadText(data, source, headers); }