Commit 8236c7ba authored by ibuler's avatar ibuler

Merge remote-tracking branch 'github/dev' into dev

parents b7fcf80f 96ec5fac
......@@ -179,7 +179,7 @@ function APIUpdateAttr(props) {
toastr.error(fail_message);
}
if (typeof props.error === 'function') {
return props.error(jqXHR.responseText);
return props.error(jqXHR.responseText, jqXHR.status);
}
});
// return true;
......@@ -234,8 +234,13 @@ function orgDelete(obj, name, url, redirectTo){
window.location.href=redirectTo;
}
};
var fail = function() {
swal("错误", "[ " + name + " ] 组织中存在未删除信息,请删除后重试", "error");
var fail = function(responseText, status) {
if (status === 400){
swal("错误", "[ " + name + " ] 组织中包含未删除信息,请删除后重试", "error");
}
else if (status === 405){
swal("错误", "请勿在组织 [ "+ name + " ] 下执行此操作,切换到其他组织后重试", "error");
}
};
APIUpdateAttr({
url: url,
......@@ -247,7 +252,7 @@ function orgDelete(obj, name, url, redirectTo){
});
}
swal({
title: "请先删除组织内的以下信息:",
title: "请确保组织内的以下信息已删除",
text: "用户列表、用户组、资产列表、网域列表、管理用户、系统用户、标签管理、资产授权规则",
type: "warning",
showCancelButton: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment