cloudstack 3.0 UI - VPC - gateways - implement Remove Gateway action.

This commit is contained in:
Jessica Wang 2012-07-11 15:15:56 -07:00
parent be4185338f
commit 76b8407b69
1 changed files with 36 additions and 3 deletions

View File

@ -490,6 +490,39 @@
},
detailView: {
name: 'Gateway details',
actions: {
remove: {
label: 'delete gateway',
messages: {
confirm: function(args) {
return 'Please confirm you want to delete the gateway';
},
notification: function(args) {
return 'delete gateway';
}
},
action: function(args) {
$.ajax({
url: createURL("deletePrivateGateway&id=" + args.context.vpcGateways[0].id),
dataType: "json",
async: true,
success: function(json) {
var jid = json.deleteprivategatewayresponse.jobid;
args.response.success(
{_custom:
{
jobId: jid
}
}
);
}
});
},
notification: {
poll: pollAsyncJobResult
}
}
},
tabs: {
details: {
title: 'label.details',
@ -500,7 +533,8 @@
{
gateway: { label: 'label.gateway' },
netmask: { label: 'label.netmask'},
vlan: { label: 'label.vlan' },
vlan: { label: 'label.vlan' },
state: { label: 'label.state' },
id: { label: 'label.id' },
zonename: { label: 'label.zone' },
domain: { label: 'label.domain' },
@ -562,8 +596,7 @@
actions: {
destroy: {
label: 'Remove static route',
action: function(args) {
//debugger;
action: function(args) {
$.ajax({
url: createURL('deleteStaticRoute'),
data: {