aboutsummaryrefslogtreecommitdiffstats
path: root/interface/js/app/upload.js
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-12-21 11:28:07 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-12-21 11:28:07 +0300
commit44ed289c481b302e7f1a5fdb57d90513e68717c5 (patch)
tree8207bc16da6c419ae07636db3f806099e57e06aa /interface/js/app/upload.js
parent62d381fdf8086660e03e34ae71155d1e73c87410 (diff)
downloadrspamd-44ed289c481b302e7f1a5fdb57d90513e68717c5.tar.gz
rspamd-44ed289c481b302e7f1a5fdb57d90513e68717c5.zip
[WebUI] Notify user if uploaded data was not learned
#2684
Diffstat (limited to 'interface/js/app/upload.js')
-rw-r--r--interface/js/app/upload.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js
index e7ea56cf6..f77cb7e78 100644
--- a/interface/js/app/upload.js
+++ b/interface/js/app/upload.js
@@ -50,9 +50,12 @@ define(["jquery"],
},
method: "POST",
headers: headers,
- success: function (json) {
+ success: function (json, jqXHR) {
cleanTextUpload(source);
rspamd.alertMessage("alert-success", "Data successfully uploaded");
+ if (jqXHR.status !== 200) {
+ rspamd.alertMessage("alert-info", jqXHR.statusText);
+ }
}
});
}