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/ui-vpc-redesign to ff58052
Date Wed, 22 May 2013 20:19:08 GMT
Updated Branches:
  refs/heads/ui-vpc-redesign 9e0733c83 -> ff58052d2


CLOUDSTACK-747: internal LB in VPC - internal LB detailView - add rules tab, assignedVMs tab.


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

Branch: refs/heads/ui-vpc-redesign
Commit: ff58052d2cd5f2ed821bef04c18960ef0d18fac2
Parents: 9e0733c
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed May 22 13:18:24 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed May 22 13:18:53 2013 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |   49 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 46 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff58052d/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index fe3ce13..5c2f026 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -482,8 +482,7 @@
                         },
                         dataType: 'json',
                         async: true,
-                        success: function(data) {
-                          debugger;
+                        success: function(data) {                          
                           var jid = data.assigntoloadbalancerruleresponse.jobid;        
                                          
                           args.response.success({
                             _custom: { jobId: jid }
@@ -519,7 +518,51 @@
                         }
                       });                        
                     }
-                  }
+                  },                                              
+                  rules: {
+                    title: 'label.rules',
+                    multiple: true,
+                    fields: [
+                      {
+                        sourceport: { label: 'Source Port' },
+                        instanceport: { label: 'Instance Port' }
+                      }
+                    ],
+                    dataProvider: function(args) {
+                      $.ajax({
+                        url: createURL('listLoadBalancers'),
+                        data: {
+                          id: args.context.internalLoadBalancers[0].id
+                        },
+                        success: function(json) {     
+                          var item = json.listloadbalancerssresponse.loadbalancer[0];
+                          args.response.success({ data: item.loadbalancerrule });       
                  
+                        }
+                      }); 
+                    }
+                  } ,              
+                  assignedVms: {
+                    title: 'Assigned VMs',
+                    multiple: true,
+                    fields: [
+                      {
+                        name: { label: 'label.name' },
+                        ipaddress: { label: 'label.ip.address' }
+                      }
+                    ],
+                    dataProvider: function(args) {
+                      $.ajax({
+                        url: createURL('listLoadBalancers'),
+                        data: {
+                          id: args.context.internalLoadBalancers[0].id
+                        },
+                        success: function(json) {     
+                          var item = json.listloadbalancerssresponse.loadbalancer[0];
+                          args.response.success({ data: item.loadbalancerinstance });   
                      
+                        }
+                      }); 
+                    }
+                  }               
                 }                
               }              
             }


Mime
View raw message