From 35e62b05f16aa734dbcdac554c56030ee9812818 Mon Sep 17 00:00:00 2001 From: lombardof Date: Fri, 25 May 2018 16:15:12 +0200 Subject: [PATCH] fix feedback action for a NS instance Change-Id: Icb27e99605db5745205fa5dfc122eaf01834eaa3 Signed-off-by: lombardof --- instancehandler/views.py | 2 +- static/src/instancehandler/instance_list.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/instancehandler/views.py b/instancehandler/views.py index e193825..9ace8ee 100644 --- a/instancehandler/views.py +++ b/instancehandler/views.py @@ -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 diff --git a/static/src/instancehandler/instance_list.js b/static/src/instancehandler/instance_list.js index 161cc51..a590fa3 100644 --- a/static/src/instancehandler/instance_list.js +++ b/static/src/instancehandler/instance_list.js @@ -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'); -- 2.25.1