FORCE option when deleting a NS instance
[osm/LW-UI.git] / static / src / instancehandler / instance_list.js
index 161cc51..47d4957 100644 (file)
@@ -19,9 +19,11 @@ function performAction(url) {
     $('#modal_instance_new_action').modal('show');
 }
 
-function deleteNs(url) {
+function deleteNs(url, force) {
     bootbox.confirm("Are you sure want to delete?", function (result) {
         if (result) {
+            if(force)
+                url = url + '?force=true';
             location.href = url
         }
     })
@@ -66,7 +68,7 @@ function showInstanceDetails(url_info) {
         },
         error: function (result) {
             dialog.modal('hide');
-            bootbox.alert("An error occurred while retrieving the information for the NS");
+            bootbox.alert("An error occurred while retrieving the information.");
         }
     });
 }
@@ -124,6 +126,10 @@ $(document).ready(function () {
             processData: false
         }).done(function (response,textStatus, jqXHR) {
             $('#modal_instance_new_action').modal('hide');
+            bootbox.alert({
+                    title: "Action",
+                    message: "Action received."
+                });
         }).fail(function(result){
             var data  = result.responseJSON;
             var title = "Error " + (data.code ? data.code: 'unknown');