fix feedback action for a NS instance 20/6220/1
authorlombardof <flombardo@cnit.it>
Fri, 25 May 2018 14:15:12 +0000 (16:15 +0200)
committerlombardof <flombardo@cnit.it>
Fri, 25 May 2018 14:15:12 +0000 (16:15 +0200)
Change-Id: Icb27e99605db5745205fa5dfc122eaf01834eaa3
Signed-off-by: lombardof <flombardo@cnit.it>
instancehandler/views.py
static/src/instancehandler/instance_list.js

index e193825..9ace8ee 100644 (file)
@@ -95,7 +95,7 @@ def action(request, project_id=None, instance_id=None, type=None):
     }
 
     result = client.ns_action(instance_id, action_payload)
-    return __response_handler(request, result, None, to_redirect=False, status=result['status'] )
+    return __response_handler(request, result, None, to_redirect=False, status=result['status'] if 'status' in result else None )
 
 
 @login_required
index 161cc51..a590fa3 100644 (file)
@@ -124,6 +124,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');