cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/4.4 to a512b78
Date Tue, 08 Apr 2014 22:36:58 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 68cf2ba0e -> a512b7847


CLOUDSTACK-6342: UI - Load Balancing page - LB rules - VM + IP Address - fix a bug that vmidipmap
was not sent to API.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a512b784
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a512b784
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a512b784

Branch: refs/heads/4.4
Commit: a512b7847ab4d4b21a3d96d0151233c06a752d62
Parents: 68cf2ba
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Apr 8 15:36:38 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Apr 8 15:36:49 2014 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a512b784/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 660838b..0276684 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -3736,14 +3736,24 @@
                                             add: {
                                                 label: 'label.add.vms.to.lb',
                                                 action: function(args) {
+                                                    var inputData = {
+                                                    	id: args.multiRule.id	
+                                                    };                                  
           
+                                                    if (args.data != null) {
+                                                		for (var k = 0; k < args.data.length;
k++) {                                                          			
+                                                			inputData['vmidipmap[' + k + '].vmid']
= args.data[k].id;
+                                                			
+                                                			if (args.context.ipAddresses[0].isportable)
{
+                                                			    inputData['vmidipmap[' + k + '].vmip']
= args.data[k]._subselect.split(',')[1];  
+                                                			} else {
+                                                				inputData['vmidipmap[' + k + '].vmip']
= args.data[k]._subselect;
+                                                			}
+                                                		}
+                                                	}   
+                                                	
                                                     $.ajax({
                                                         url: createURL('assignToLoadBalancerRule'),
-                                                        data: {
-                                                            id: args.multiRule.id,
-                                                            virtualmachineids: $.map(args.data,
function(elem) {
-                                                                return elem.id;
-                                                            }).join(',')
-                                                        },
+                                                        data: inputData,
                                                         success: function(json) {
                                                             args.response.success({
                                                                 notification: {
@@ -3783,10 +3793,7 @@
                                                 	
                                                     $.ajax({
                                                         url: createURL('removeFromLoadBalancerRule'),
-                                                        data: {
-                                                            id: args.multiRule.id,
-                                                            virtualmachineids: args.item.id
-                                                        },
+                                                        data: inputData,
                                                         success: function(json) {
                                                             args.response.success({
                                                                 notification: {


Mime
View raw message