File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 37363736 add : {
37373737 label : 'label.add.vms.to.lb' ,
37383738 action : function ( args ) {
3739+ var inputData = {
3740+ id : args . multiRule . id
3741+ } ;
3742+ if ( args . data != null ) {
3743+ for ( var k = 0 ; k < args . data . length ; k ++ ) {
3744+ inputData [ 'vmidipmap[' + k + '].vmid' ] = args . data [ k ] . id ;
3745+
3746+ if ( args . context . ipAddresses [ 0 ] . isportable ) {
3747+ inputData [ 'vmidipmap[' + k + '].vmip' ] = args . data [ k ] . _subselect . split ( ',' ) [ 1 ] ;
3748+ } else {
3749+ inputData [ 'vmidipmap[' + k + '].vmip' ] = args . data [ k ] . _subselect ;
3750+ }
3751+ }
3752+ }
3753+
37393754 $ . ajax ( {
37403755 url : createURL ( 'assignToLoadBalancerRule' ) ,
3741- data : {
3742- id : args . multiRule . id ,
3743- virtualmachineids : $ . map ( args . data , function ( elem ) {
3744- return elem . id ;
3745- } ) . join ( ',' )
3746- } ,
3756+ data : inputData ,
37473757 success : function ( json ) {
37483758 args . response . success ( {
37493759 notification : {
37833793
37843794 $ . ajax ( {
37853795 url : createURL ( 'removeFromLoadBalancerRule' ) ,
3786- data : {
3787- id : args . multiRule . id ,
3788- virtualmachineids : args . item . id
3789- } ,
3796+ data : inputData ,
37903797 success : function ( json ) {
37913798 args . response . success ( {
37923799 notification : {
You can’t perform that action at this time.
0 commit comments