rhtyd commented on a change in pull request #2216: CLOUDSTACK-10027 Repeating 
the same list for Internal LB in VPC
URL: https://github.com/apache/cloudstack/pull/2216#discussion_r134763805
 
 

 ##########
 File path: ui/scripts/vpc.js
 ##########
 @@ -745,12 +745,24 @@
                         }
                     },
                     dataProvider: function(args) {
+                        var array1 = [];
+                        if (args.filterBy != null) {
+                            if (args.filterBy.search != null && 
args.filterBy.search.by != null && args.filterBy.search.value != null) {
+                                if (args.filterBy.search.by === "name") {
+                                    if (args.filterBy.search.value.length > 0)
+                                        array1.push("&keyword=" + 
args.filterBy.search.value);
+                                }
+                            }
+                        }
+                        var data = {
+                            page: args.page,
+                            pageSize: pageSize,
+                            networkid: args.context.networks[0].id,
+                            listAll: true
+                        };
                         $.ajax({
-                            url: createURL('listLoadBalancers'),
-                            data: {
-                                networkid: args.context.networks[0].id,
-                                listAll: true
-                            },
+                            url: createURL('listLoadBalancers' + 
array1.join("")),
+                            data: data,
                             success: function(json) {
 
 Review comment:
   @vedulasantosh much better, however, that's not why I meant. It still does 
not remove the array/join usage. On line 764, remove appending of 
`array1.join()` usage, instead move the `data` object after line 747, and at 
line 753, push the key/value to the `data` object. 
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to