mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
[Update] 修复批量删除资产,当待删除数量和资产总数相等时,提示删除失败。
This commit is contained in:
@@ -258,6 +258,10 @@ $(document).ready(function(){
|
||||
confirmButtonText: "{% trans 'Confirm' %}",
|
||||
closeOnConfirm: false
|
||||
},function () {
|
||||
function fail() {
|
||||
var msg = "{% trans 'Asset Deleting failed.' %}";
|
||||
swal("{% trans 'Asset Delete' %}", msg, "error");
|
||||
}
|
||||
function success(data) {
|
||||
url = setUrlParam(the_url, 'spm', data.spm);
|
||||
requestApi({
|
||||
@@ -268,13 +272,10 @@ $(document).ready(function(){
|
||||
swal("{% trans 'Asset Delete' %}", msg, "success");
|
||||
reloadTable();
|
||||
},
|
||||
error: fail,
|
||||
flash_message: false,
|
||||
});
|
||||
}
|
||||
function fail() {
|
||||
var msg = "{% trans 'Asset Deleting failed.' %}";
|
||||
swal("{% trans 'Asset Delete' %}", msg, "error");
|
||||
}
|
||||
requestApi({
|
||||
url: "{% url 'api-common:resources-cache' %}",
|
||||
method: 'POST',
|
||||
|
Reference in New Issue
Block a user