From b727c5849709be864e05df7305a79530555d14ac Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 11 Jul 2012 14:50:57 -0700 Subject: [PATCH] cloudstack 3.0 UI - VPC - gateways - static route - implement Remove action. --- ui/scripts/vpc.js | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 4133ee7b462..f42c6513c27 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -561,15 +561,31 @@ }, actions: { destroy: { - label: 'Remove ACL', - action: function(args) { - args.response.success({ - notification: { - label: 'Remove static route from gateway', - poll: function(args) { args.complete(); } + label: 'Remove static route', + action: function(args) { + //debugger; + $.ajax({ + url: createURL('deleteStaticRoute'), + data: { + id: args.context.multiRule[0].id + }, + dataType: 'json', + async: true, + success: function(data) { + var jobID = data.deletestaticrouteresponse.jobid; + + args.response.success({ + _custom: { + jobId: jobID + }, + notification: { + label: 'Remove static route', + poll: pollAsyncJobResult + } + }); } }); - } + } } }, dataProvider: function(args) {