cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rafaelweingartner commented on a change in pull request #2464: [4.11] CLOUDSTACK-10299: UI: fix error in network listing in project mode
Date Thu, 01 Jan 1970 00:00:00 GMT
rafaelweingartner commented on a change in pull request #2464: [4.11] CLOUDSTACK-10299: UI:
fix error in network listing in project mode
URL: https://github.com/apache/cloudstack/pull/2464#discussion_r169616063
 
 

 ##########
 File path: ui/scripts/network.js
 ##########
 @@ -3537,28 +3535,28 @@
                                                         var lbID = data.createloadbalancerruleresponse.id;
 
                                                         var inputData = {
-                                                        	id: data.createloadbalancerruleresponse.id

-                                                        };    
-                                                        
+                                                        	id: data.createloadbalancerruleresponse.id
+                                                        };
+
                                                         var selectedVMs = args.itemData;
                                                         if (selectedVMs != null) {
                                                         	var vmidipmapIndex = 0;
-                                                    		for (var vmIndex = 0; vmIndex <
selectedVMs.length; vmIndex++) {      
+                                                    		for (var vmIndex = 0; vmIndex <
selectedVMs.length; vmIndex++) {
                                                     			var selectedIPs = selectedVMs[vmIndex]._subselect;
                                                     			for (var ipIndex = 0; ipIndex <
selectedIPs.length; ipIndex++) {
                                                     				inputData['vmidipmap[' + vmidipmapIndex
+ '].vmid'] = selectedVMs[vmIndex].id;
-                                                        			
+
                                                     				if (args.context.ipAddresses[0].isportable)
{
-                                                        			    inputData['vmidipmap[' + vmidipmapIndex
+ '].vmip'] = selectedIPs[ipIndex].split(',')[1];  
+                                                        			    inputData['vmidipmap[' + vmidipmapIndex
+ '].vmip'] = selectedIPs[ipIndex].split(',')[1];
                                                         			} else {
                                                         				inputData['vmidipmap[' + vmidipmapIndex
+ '].vmip'] = selectedIPs[ipIndex];
                                                         			}
-                                                    				
+
                                                     				vmidipmapIndex++;
-                                                    			}                                
               			
+                                                    			}
                                                     		}
-                                                    	}   
-                                                        
+                                                    	}
+
                                                         /*$.ajax({
 
 Review comment:
   Well.. the commented code is not used. So, there is your reason to remove it. The less
"code" (lines) for our eyes to see, the better.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message