cloudStack 3.0 new UI - NaaS - Public network - IP Addresses tab - implement Delete action.

This commit is contained in:
Jessica Wang 2011-11-10 14:27:53 -08:00
parent 449c6dda33
commit 3e124a9ad1
1 changed files with 22 additions and 10 deletions

View File

@ -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();
}
}
});
}
});
}
}
},