X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=vimhandler%2Ftemplate%2Fvim_list.html;h=07cb8578f09727c503a6bb68ecddef8a64894621;hb=refs%2Fchanges%2F29%2F6429%2F1;hp=6823c724b68893b2d5e93109d3a2234d09fd531c;hpb=45e33ee184cb787b19549e23121efad559497007;p=osm%2FLW-UI.git diff --git a/vimhandler/template/vim_list.html b/vimhandler/template/vim_list.html index 6823c72..07cb857 100644 --- a/vimhandler/template/vim_list.html +++ b/vimhandler/template/vim_list.html @@ -96,7 +96,30 @@ function deleteVim(url) { bootbox.confirm("Are you sure want to delete?", function (result) { if (result) { - location.href = url//'/vims/' + vim_uuid + '/delete' + var dialog = bootbox.dialog({ + message: '
Loading...
', + closeButton: true + }); + $.ajax({ + url: url, + type: 'GET', + dataType: "json", + contentType: "application/json;charset=utf-8", + success: function (result) { + if (result['error'] == true) { + dialog.modal('hide'); + bootbox.alert("An error occurred."); + } + else { + dialog.modal('hide'); + location.reload(); + } + }, + error: function (error) { + dialog.modal('hide'); + bootbox.alert("An error occurred."); + } + }); } }) }