cloudstack 3.0 UI - VPC - tier - implement Remove Tier action.

This commit is contained in:
Jessica Wang 2012-07-07 13:35:01 -07:00
parent 93b264b219
commit 33cf9468b6
2 changed files with 22 additions and 5 deletions

View File

@ -392,8 +392,10 @@
action({
context: context,
response: {
success: function(args) {
success({ remove: true });
success: function(args) {
success($.extend(args, {
remove: true
}));
}
}
});

View File

@ -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
}
}
},