You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2012/09/28 20:07:29 UTC

git commit: CS-16344: cloudstack UI - Port Forwarding section - add port ranges back to private port and public port.

Updated Branches:
  refs/heads/master a892f0828 -> 2214ba6c1


CS-16344: cloudstack UI - Port Forwarding section - add port ranges back to private port and public port.


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

Branch: refs/heads/master
Commit: 2214ba6c17c4da677d9616d9609b6a127e1b9137
Parents: a892f08
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Sep 14 13:40:57 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Fri Sep 28 10:58:10 2012 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   45 ++++++++++++++++++++++++-------------------
 1 files changed, 25 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2214ba6c/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index e1c32b4..71f3007 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2745,14 +2745,16 @@
                       //'private-ports': {
                       privateport: {
                         edit: true,
-                        label: 'label.private.port'
+                        label: 'label.private.port',
                         //range: ['privateport', 'privateendport']  //Bug 13427 - Don't allow port forwarding ranges in the CreatePortForwardingRule API
+												range: ['privateport', 'privateendport']    //Bug 16344 (restore port range back) (http://bugs.cloudstack.org/browse/CS-16344)
                       },
                       //'public-ports': {
                       publicport: {
                         edit: true,
-                        label: 'label.public.port'
+                        label: 'label.public.port',
                         //range: ['publicport', 'publicendport']  //Bug 13427 - Don't allow port forwarding ranges in the CreatePortForwardingRule API
+												range: ['publicport', 'publicendport']    //Bug 16344 (restore port range back) (http://bugs.cloudstack.org/browse/CS-16344)
                       },
                       'protocol': {
                         label: 'label.protocol',
@@ -2775,25 +2777,28 @@
 
                     add: {
                       label: 'label.add.vm',
-                      action: function(args) {  
-												var data = {
-												  ipaddressid: args.context.ipAddresses[0].id,
-												  privateport: args.data.privateport,
-													publicport: args.data.publicport,
-													protocol: args.data.protocol,		
-													virtualmachineid: args.itemData[0].id,
-                          openfirewall: false													
-												};	
-													                        								
-												if('vpc' in args.context) { //from VPC section
-												  if(args.data.tier == null) {													  
-														args.response.error('Tier is required');
-													  return;
-													}			
+
+                      action: function(args) {
+                        var data = {
+                          ipaddressid: args.context.ipAddresses[0].id,
+                          privateport: args.data.privateport,
+													privateendport: args.data.privateendport,
+                          publicport: args.data.publicport,
+													publicendport: args.data.publicendport,
+                          protocol: args.data.protocol,
+                          virtualmachineid: args.itemData[0].id,
+                          openfirewall: false
+                        };
+
+                        if('vpc' in args.context) { //from VPC section
+                          if(args.data.tier == null) {
+                            args.response.error('Tier is required');
+                            return;
+                          }
                           $.extend(data, {
-                            networkid: args.data.tier		
-                          });	
-												}
+                            networkid: args.data.tier
+                          });
+                        }                        
 												else {  //from Guest Network section
 												  $.extend(data, {
                             networkid: args.context.networks[0].id