mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-17 18:33:32 +09:00
Clear cache for vm saveas, and clone actions
This commit is contained in:
1 parent
dc9255625b
commit
3922a7290f
3 files changed
+8
No files matched your search
@@ -551,12 +551,17 @@ var OpenNebula = {
|
||||
};
|
||||
|
||||
var req_path = path ? path : resource.toLowerCase();
|
||||
var cache_name = params.cache_name ? params.cache_name : resource;
|
||||
|
||||
$.ajax({
|
||||
url: req_path + "/" + id + "/action",
|
||||
type: "POST",
|
||||
data: JSON.stringify(action),
|
||||
success: function(){
|
||||
if(method == "clone"){
|
||||
OpenNebula.Helper.clear_cache(cache_name);
|
||||
}
|
||||
|
||||
return callback ? callback(request) : null;
|
||||
},
|
||||
error: function(response){
|
||||
|
||||
@@ -190,6 +190,8 @@ var group_actions = {
|
||||
$create_group_dialog.empty();
|
||||
setupCreateGroupDialog();
|
||||
|
||||
OpenNebula.Helper.clear_cache("USER");
|
||||
|
||||
Sunstone.runAction("Group.list");
|
||||
notifyCustom(tr("Group created"), " ID: " + response.GROUP.ID, false);
|
||||
},
|
||||
|
||||
@@ -629,6 +629,7 @@ var vm_actions = {
|
||||
call: OpenNebula.VM.saveas,
|
||||
callback: function(request) {
|
||||
Sunstone.runAction("VM.show", request.request.data[0]);
|
||||
OpenNebula.Helper.clear_cache("IMAGE");
|
||||
},
|
||||
error:onError,
|
||||
notify: true
|
||||
|
||||
Reference in new issue
Block a user