cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [12/50] [abbrv] git commit: updated refs/heads/vmsync to 3c2aa18
Date Thu, 27 Jun 2013 20:57:14 GMT
CLOUDSTACK-3130: UI > VPC section - Enable Static NAT - Select VM for static NAT- show no
VMs when no tier is selected.


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

Branch: refs/heads/vmsync
Commit: 774141a9dcdec7af7fde7114d4a78404d20f416f
Parents: fc93b68
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Jun 25 16:36:42 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Jun 25 16:36:42 2013 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 12 +++++---
 ui/scripts/vpc.js     | 68 +---------------------------------------------
 2 files changed, 9 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/774141a9/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index fbd8b01..c52b85a 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2155,11 +2155,15 @@
                             return;             
                           }
 
-                          if('vpc' in args.context) {
-                            if($tierSelect.size() && $tierSelect.val() != '-1' ){

-                              data.networkid = $tierSelect.val();
-                            }                          
+                          // if no tier is selected
+                          if($tierSelect.val() == '-1'){
+                            args.response.success({ data: null });
+                            return;             
+                          }
+                          
+                          if('vpc' in args.context) {                                   
                                    
                             $.extend(data, {
+                            	networkid: $tierSelect.val(),
                               vpcid: args.context.vpc[0].id
                             });
                           }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/774141a9/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index ca02c77..f610889 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -471,73 +471,7 @@
           detailView: {
             isMaximized: true,
             name: 'Internal LB details',
-            actions: {
-              /*
-              assignVm: { 
-                label: 'Assign VMs to Internal LB',
-                messages: {
-                  notification: function(args) { return 'Assign VMs to Internal LB'; }
-                },
-                listView: $.extend(true, {}, cloudStack.sections.instances.listView, {
-                  type: 'checkbox',
-                  filters: false,
-                  dataProvider: function(args) {
-                    $.ajax({
-                      url: createURL('listVirtualMachines'),
-                      data: {
-                        networkid: args.context.networks[0].id,
-                        listAll: true
-                      },
-                      success: function(json) {
-                        var instances = json.listvirtualmachinesresponse.virtualmachine;
-
-                        // Pre-select existing instances in LB rule
-                        $(instances).map(function(index, instance) {
-                          instance._isSelected = $.grep(
-                            args.context.internalLoadBalancers[0].loadbalancerinstance,
-                            
-                            function(lbInstance) {
-                              return lbInstance.id == instance.id;
-                            }
-                          ).length ? true : false;
-                        });
-                        
-                        args.response.success({
-                          data: instances
-                        });
-                      }
-                    });
-                  }
-                }),
-                action: function(args) {                      
-                  var vms = args.context.instances;
-                  var array1 = [];
-                  for(var i = 0; i < vms.length; i++) {
-                    array1.push(vms[i].id);
-                  }
-                  var virtualmachineids = array1.join(',');
-                  
-                  $.ajax({
-                    url: createURL('assignToLoadBalancerRule'),
-                    data: {
-                      id: args.context.internalLoadBalancers[0].id,
-                      virtualmachineids: virtualmachineids
-                    },
-                    dataType: 'json',
-                    async: true,
-                    success: function(data) {                          
-                      var jid = data.assigntoloadbalancerruleresponse.jobid;            
                                      
-                      args.response.success({
-                        _custom: { jobId: jid }
-                      });
-                    }
-                  });
-                },
-                notification: {
-                  poll: pollAsyncJobResult
-                }
-              },      
-              */                     
+            actions: {              
               remove: {
                 label: 'Delete Internal LB',
                 messages: {


Mime
View raw message