|
605 | 605 |
|
606 | 606 | assignedVms: { |
607 | 607 | title: 'Assigned VMs', |
608 | | - multiple: true, |
609 | 608 | listView: { |
610 | 609 | id: 'assignedVms', |
611 | 610 | fields: { |
|
625 | 624 | }); |
626 | 625 | }, |
627 | 626 | actions: { |
628 | | - add: { |
| 627 | + add: { |
629 | 628 | label: 'Assign VMs', |
630 | | - messages: { |
| 629 | + messages: { |
631 | 630 | notification: function(args) { return 'Assign VMs'; } |
632 | 631 | }, |
| 632 | + needsRefresh: true, |
633 | 633 | listView: $.extend(true, {}, cloudStack.sections.instances.listView, { |
634 | 634 | type: 'checkbox', |
635 | 635 | filters: false, |
|
688 | 688 | notification: { |
689 | 689 | poll: pollAsyncJobResult |
690 | 690 | } |
691 | | - }, |
692 | | - |
693 | | - remove: { |
694 | | - label: 'remove VM from load balancer', |
695 | | - addRow: 'false', |
696 | | - messages: { |
697 | | - confirm: function(args) { |
698 | | - return 'Please confirm you want to remove VM from load balancer'; |
| 691 | + } |
| 692 | + }, |
| 693 | + detailView: { |
| 694 | + actions: { |
| 695 | + remove: { |
| 696 | + label: 'remove VM from load balancer', |
| 697 | + addRow: 'false', |
| 698 | + messages: { |
| 699 | + confirm: function(args) { |
| 700 | + return 'Please confirm you want to remove VM from load balancer'; |
| 701 | + }, |
| 702 | + notification: function(args) { |
| 703 | + return 'remove VM from load balancer'; |
| 704 | + } |
| 705 | + }, |
| 706 | + action: function(args) { |
| 707 | + $.ajax({ |
| 708 | + url: createURL('removeFromLoadBalancerRule'), |
| 709 | + data: { |
| 710 | + id: args.context.internalLoadBalancers[0].id, |
| 711 | + virtualmachineids: args.context.assignedVms[0].id |
| 712 | + }, |
| 713 | + success: function(json) { |
| 714 | + var jid = json.removefromloadbalancerruleresponse.jobid; |
| 715 | + args.response.success({ |
| 716 | + _custom: { jobId: jid } |
| 717 | + }); |
| 718 | + } |
| 719 | + }); |
699 | 720 | }, |
700 | | - notification: function(args) { |
701 | | - return 'remove VM from load balancer'; |
| 721 | + notificaton: { |
| 722 | + poll: pollAsyncJobResult |
702 | 723 | } |
703 | | - }, |
704 | | - action: function(args) { |
705 | | - $.ajax({ |
706 | | - url: createURL('removeFromLoadBalancerRule'), |
707 | | - data: { |
708 | | - id: args.context.internalLoadBalancers[0].id, |
709 | | - virtualmachineids: args.context.assignedVms[0].id |
| 724 | + } |
| 725 | + }, |
| 726 | + tabs: { |
| 727 | + details: { |
| 728 | + title: 'label.details', |
| 729 | + fields: [ |
| 730 | + { |
| 731 | + name: { label: 'label.name' } |
710 | 732 | }, |
711 | | - success: function(json) { |
712 | | - var jid = json.removefromloadbalancerruleresponse.jobid; |
713 | | - args.response.success({ |
714 | | - _custom: { jobId: jid } |
715 | | - }); |
| 733 | + { |
| 734 | + ipaddress: { label: 'label.ip.address' } |
716 | 735 | } |
717 | | - }); |
718 | | - }, |
719 | | - notificaton: { |
720 | | - poll: pollAsyncJobResult |
| 736 | + ], |
| 737 | + dataProvider: function(args) { |
| 738 | + setTimeout(function() { |
| 739 | + args.response.success({ data: args.context.assignedVms[0] }); |
| 740 | + }); |
| 741 | + } |
721 | 742 | } |
722 | 743 | } |
723 | 744 | } |
|
0 commit comments