aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
Diffstat (limited to 'interface')
-rw-r--r--interface/index.html5
-rw-r--r--interface/js/app/upload.js10
2 files changed, 11 insertions, 4 deletions
diff --git a/interface/index.html b/interface/index.html
index a759ac48f..8329a74dd 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -488,7 +488,7 @@
</div>
<div class="col-lg-6">
<div class="card bg-light shadow card-body card p-2">
- <p>Learn Fuzzy storage:</p>
+ <p>Fuzzy hash storage management:</p>
<form class="d-flex">
<div class="d-flex align-items-center">
<label for="fuzzyFlagText">Flag:</label>
@@ -498,7 +498,8 @@
<label for="fuzzyWeightText">Weight:</label>
<input name="fuzzyWeightText" id="fuzzyWeightText" class="form-control ms-1" type="number" value="1"/>
</div>
- <button class="btn btn-warning ms-2 d-flex align-items-center" data-upload="fuzzy" disabled><i class="fas fa-upload me-2"></i>Upload FUZZY</button>
+ <button class="btn btn-warning ms-2 d-flex align-items-center" data-upload="fuzzyadd" disabled><i class="fas fa-circle-plus me-2"></i>Add hash</button>
+ <button class="btn btn-danger ms-2 d-flex align-items-center" data-upload="fuzzydel" disabled><i class="fas fa-trash-can me-2"></i>Delete hash</button>
</form>
</div>
</div>
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js
index a484a41aa..d85196296 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);
}