diff --git a/ui/scripts/ui-custom/vpc.js b/ui/scripts/ui-custom/vpc.js index cc9edab1f41..90ce2a621eb 100644 --- a/ui/scripts/ui-custom/vpc.js +++ b/ui/scripts/ui-custom/vpc.js @@ -392,8 +392,10 @@ action({ context: context, response: { - success: function(args) { - success({ remove: true }); + success: function(args) { + success($.extend(args, { + remove: true + })); } } }); diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index f3747be57e8..a18fc6f67d6 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -399,11 +399,26 @@ remove: { label: 'Remove tier', - action: function(args) { - args.response.success(); + action: function(args) { + $.ajax({ + url: createURL('deleteNetwork'), + dataType: "json", + data: { + id: args.context.tiers[0].id + }, + success: function(json) { + var jid = json.deletenetworkresponse.jobid; + args.response.success( + {_custom: + {jobId: jid + } + } + ); + } + }); }, notification: { - poll: function(args) { args.complete(); } + poll: pollAsyncJobResult } } },