diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-07-29 19:12:12 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-07-29 19:12:12 +0300 |
commit | 5889a6f418efdeb9ecff06b81ba523a1d241eedb (patch) | |
tree | fac6d909a34624c2a5593232b496743a977a9454 /interface | |
parent | 519ae50058e21681c22848c4c7ce5267a1d4c860 (diff) | |
download | rspamd-5889a6f418efdeb9ecff06b81ba523a1d241eedb.tar.gz rspamd-5889a6f418efdeb9ecff06b81ba523a1d241eedb.zip |
[Minor] Fix save map on cluster messages
Diffstat (limited to 'interface')
-rw-r--r-- | interface/js/app/config.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 8fbaf4fe0..5bebca62a 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -32,8 +32,9 @@ define(["jquery"], $("#modalDialog").modal("hide"); } function save_map_error(rspamd, serv, jqXHR, textStatus, errorThrown) { + var serv_name = (typeof serv === "string") ? serv : serv.name; rspamd.alertMessage("alert-modal alert-error", "Save map error on " + - serv.name + ": " + errorThrown); + serv_name + ": " + errorThrown); } // @upload map from modal function saveMap(rspamd, action, id) { @@ -267,8 +268,12 @@ define(["jquery"], var id = $(form).attr("id"); var data = $("#" + id).find("textarea").val(); rspamd.query(action, { - success: save_map_success, - error: save_map_error, + success: function () { + save_map_success(rspamd); + }, + error: function (serv, jqXHR, textStatus, errorThrown) { + save_map_error(rspamd, serv, jqXHR, textStatus, errorThrown); + }, method: "POST", headers: { Map: id, |