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/master to bea3f44
Date Wed, 05 Jun 2013 20:44:35 GMT
Updated Branches:
  refs/heads/master ee5f3d726 -> bea3f4414


CLOUDSTACK-747: UI - Internal LB detailView - Assigned VMs tab - implement Remove from LB
action.


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

Branch: refs/heads/master
Commit: bea3f441446aa1b56a758233dc812da10e1a9ff3
Parents: ee5f3d7
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Jun 5 13:43:51 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Jun 5 13:43:51 2013 -0700

----------------------------------------------------------------------
 ui/scripts/vpc.js |   37 +++++++++++++++++++++++++++++++++++--
 1 files changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bea3f441/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 4cdc140..7ebc3f3 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -606,7 +606,8 @@
               assignedVms: {
                 title: 'Assigned VMs',
                 multiple: true,
-                listView: {                  
+                listView: {  
+                  id: 'assignedVms',
                   fields: {
                     name: { label: 'label.name' },
                     ipaddress: { label: 'label.ip.address' }
@@ -622,7 +623,39 @@
                         args.response.success({ data: item.loadbalancerinstance });     
                    
                       }
                     }); 
-                  }                 
+                  },
+                  actions: {
+                    remove: {
+                      label: 'remove VM from load balancer',
+                      addRow: 'false',
+                      messages: {
+                        confirm: function(args) {
+                          return 'Please confirm you want to remove VM from load balancer';
+                        },
+                        notification: function(args) {
+                          return 'remove VM from load balancer';
+                        }
+                      },
+                      action: function(args) {                        
+                        $.ajax({
+                          url: createURL('removeFromLoadBalancerRule'),
+                          data: {   
+                            id: args.context.internalLoadBalancers[0].id,
+                            virtualmachineids: args.context.assignedVms[0].id
+                          },
+                          success: function(json) {                            
+                            var jid = json.removefromloadbalancerruleresponse.jobid;
+                            args.response.success({
+                              _custom: { jobId: jid }
+                            });                            
+                          }
+                        });
+                      },
+                      notificaton: {
+                        poll: pollAsyncJobResult
+                      }
+                    }
+                  }
                 }                
               }               
             }                


Mime
View raw message