mirror of https://github.com/jumpserver/jumpserver
[Update] Stash
parent
fb9e2ac9f6
commit
f4136decde
|
@ -67,7 +67,7 @@ class TreeMixin:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def refresh_node_assets(cls, t=None):
|
def refresh_node_assets(cls, t=None):
|
||||||
logger.debug("Refresh node tree assets")
|
logger.debug("Refresh node assets")
|
||||||
key = cls.tree_assets_cache_key
|
key = cls.tree_assets_cache_key
|
||||||
ttl = cls.tree_cache_time
|
ttl = cls.tree_cache_time
|
||||||
if not t:
|
if not t:
|
||||||
|
|
|
@ -426,13 +426,15 @@ $(document).ready(function(){
|
||||||
function success(data) {
|
function success(data) {
|
||||||
url = setUrlParam(the_url, 'spm', data.spm);
|
url = setUrlParam(the_url, 'spm', data.spm);
|
||||||
requestApi({
|
requestApi({
|
||||||
url:url,
|
url: url,
|
||||||
method:'DELETE',
|
method: 'DELETE',
|
||||||
success:refreshPage,
|
success: function () {
|
||||||
flash_message:false,
|
|
||||||
});
|
|
||||||
var msg = "{% trans 'Asset Deleted.' %}";
|
var msg = "{% trans 'Asset Deleted.' %}";
|
||||||
swal("{% trans 'Asset Delete' %}", msg, "success");
|
swal("{% trans 'Asset Delete' %}", msg, "success");
|
||||||
|
refreshPage();
|
||||||
|
},
|
||||||
|
flash_message: false,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function fail() {
|
function fail() {
|
||||||
var msg = "{% trans 'Asset Deleting failed.' %}";
|
var msg = "{% trans 'Asset Deleting failed.' %}";
|
||||||
|
@ -440,10 +442,11 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
requestApi({
|
requestApi({
|
||||||
url: "{% url 'api-common:resources-cache' %}",
|
url: "{% url 'api-common:resources-cache' %}",
|
||||||
method:'POST',
|
method: 'POST',
|
||||||
body:JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
success:success,
|
success: success,
|
||||||
error:fail
|
error: fail,
|
||||||
|
flash_message: false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue