[WebUI] Notify user if uploaded data was not learnedtags/1.9.0
@@ -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"); | |||
} |
@@ -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); | |||
} | |||
} | |||
}); |