From 3e124a9ad11d61db19d533e701f8e7df0caf950b Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 10 Nov 2011 14:27:53 -0800 Subject: [PATCH] cloudStack 3.0 new UI - NaaS - Public network - IP Addresses tab - implement Delete action. --- ui/scripts/system.js | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 276e354eb04..09d7fe98f05 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -139,6 +139,8 @@ else array1.push("&vlan=untagged"); + + array1.push("&isshared=true"); //temporary, will add scope, domain, account field, then uncommment the following section later. /* if($form.find('.form-item[rel=domainId]').css("display") != "none") { if($form.find('.form-item[rel=account]').css("display") != "none") { //account-specific @@ -190,16 +192,26 @@ }, actions: { destroy: { - label: 'Remove Rule', - action: function(args) { - setTimeout(function() { - args.response.success({ - notification: { - label: 'Removed IP address', - poll: testData.notifications.testPoll - } - }); - }, 500); + label: 'Delete', + action: function(args) { + $.ajax({ + url: createURL('deleteVlanIpRange'), + data: { + id: args.context.multiRule[0].id + }, + dataType: 'json', + async: true, + success: function(json) { + args.response.success({ + notification: { + label: 'Remove IP range ' + args.context.multiRule[0].id, + poll: function(args) { + args.complete(); + } + } + }); + } + }); } } },