|
433 | 433 | } |
434 | 434 | ); |
435 | 435 | } |
436 | | - }); |
437 | | - |
438 | | - args.response.success(); |
| 436 | + }); |
439 | 437 | }, |
440 | 438 | notification: { |
441 | 439 | poll: pollAsyncJobResult |
|
444 | 442 | }, |
445 | 443 |
|
446 | 444 | detailView: { |
447 | | - name: 'Internal Lb details', |
| 445 | + name: 'Internal LB details', |
448 | 446 | actions: { |
449 | 447 | assignVm: { |
450 | | - label: 'Assign VMs to LB', |
| 448 | + label: 'Assign VMs to Internal LB', |
451 | 449 | messages: { |
452 | | - notification: function(args) { return 'Assign VM to internal LB rule'; } |
| 450 | + notification: function(args) { return 'Assign VMs to Internal LB'; } |
453 | 451 | }, |
454 | 452 | listView: $.extend(true, {}, cloudStack.sections.instances.listView, { |
455 | 453 | type: 'checkbox', |
|
509 | 507 | notification: { |
510 | 508 | poll: pollAsyncJobResult |
511 | 509 | } |
512 | | - } |
| 510 | + }, |
| 511 | + remove: { |
| 512 | + label: 'Delete Internal LB', |
| 513 | + messages: { |
| 514 | + confirm: function(args) { |
| 515 | + return 'Please confirm you want to delete Internal LB'; |
| 516 | + }, |
| 517 | + notification: function(args) { |
| 518 | + return 'Delete Internal LB'; |
| 519 | + } |
| 520 | + }, |
| 521 | + action: function(args) { |
| 522 | + var data = { |
| 523 | + id: args.context.internalLoadBalancers[0].id |
| 524 | + }; |
| 525 | + $.ajax({ |
| 526 | + url: createURL('deleteLoadBalancer'), |
| 527 | + data: data, |
| 528 | + async: true, |
| 529 | + success: function(json) { |
| 530 | + var jid = json.deleteloadbalancerresponse.jobid; |
| 531 | + args.response.success({ |
| 532 | + _custom: { jobId: jid } |
| 533 | + }); |
| 534 | + }, |
| 535 | + error: function(data) { |
| 536 | + args.response.error(parseXMLHttpResponse(data)); |
| 537 | + } |
| 538 | + }); |
| 539 | + }, |
| 540 | + notification: { |
| 541 | + poll: pollAsyncJobResult |
| 542 | + } |
| 543 | + } |
513 | 544 | }, |
514 | 545 | tabs: { |
515 | 546 | details: { |
|
0 commit comments