summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interface/js/app/rspamd.js4
-rw-r--r--interface/js/app/upload.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 29bbfbcf1..b0b2c4568 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -219,11 +219,11 @@ function ($, D3pie, visibility, NProgress, tab_stat, tab_graph, tab_config,
errorMessage();
}
},
- complete: function () {
+ complete: function (jqXHR) {
if (neighbours_status.every(function (elt) { return elt.checked; })) {
if (neighbours_status.some(function (elt) { return elt.status; })) {
if (o.success) {
- o.success(neighbours_status);
+ o.success(neighbours_status, jqXHR);
} else {
alertMessage("alert-success", "Request completed");
}
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js
index 466d5d25e..f77cb7e78 100644
--- a/interface/js/app/upload.js
+++ b/interface/js/app/upload.js
@@ -50,10 +50,11 @@ define(["jquery"],
},
method: "POST",
headers: headers,
- success: function (json) {
+ success: function (json, jqXHR) {
cleanTextUpload(source);
- if (json[0].status === true) {
- rspamd.alertMessage("alert-success", "Data successfully uploaded");
+ rspamd.alertMessage("alert-success", "Data successfully uploaded");
+ if (jqXHR.status !== 200) {
+ rspamd.alertMessage("alert-info", jqXHR.statusText);
}
}
});