Revert "cloudstack UI - Static NAT, Port Forwarding and Firewall Implementation 
on JuniperSRX - IP Address page - configuration - Firewall - exclude ICMP from 
Protocol dropdown."

This reverts commit b7ccae0dde6f6949e5314036a7aa71460d676316.


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

Branch: refs/heads/marvin-parallel
Commit: e531763d8789a99a503fb95f5eed2dd1be2e5739
Parents: 0c96db5
Author: Jessica Wang <[email protected]>
Authored: Thu Oct 25 12:43:25 2012 -0700
Committer: Jessica Wang <[email protected]>
Committed: Thu Oct 25 12:43:25 2012 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   42 ++++++++----------------------------------
 1 files changed, 8 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e531763d/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 4fb5ffe..0830701 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2000,40 +2000,14 @@
                               $icmpFields.parent().find('label.error').hide();
                             }
                           });
-                                                                               
                        
-                                                                               
                        var data = [
-                                                                               
                                { name: 'tcp', description: 'TCP' },
-                                                                               
                                { name: 'udp', description: 'UDP' }
-                                                                               
                        ];
-                                                                               
                        //ICMP portocol is not supported in Firewall provided 
by JuniperSRX                                                                   
                                  
-                                                                               
                        $.ajax({
-                                                                               
                                url: createURL('listNetworkOfferings'),
-                                                                               
                                data: {
-                                                                               
                                        id: 
args.context.networks[0].networkofferingid
-                                                                               
                                },
-                                                                               
                                async: false,
-                                                                               
                                success: function(json) {               
-                                                                               
                                        var serviceArray = 
json.listnetworkofferingsresponse.networkoffering[0].service;
-                                                                               
                                        var 
FirewallProviderArrayIncludesJuniperSRX = false;
-                                                                               
                                        for(var i = 0; i < serviceArray.length; 
i++) {
-                                                                               
                                                if(serviceArray[i].name == 
"Firewall") {
-                                                                               
                                                        var providerArray = 
serviceArray[i].provider;
-                                                                               
                                                        for(var k = 0; k < 
providerArray.length; k++) {
-                                                                               
                                                                
if(providerArray[k].name == "JuniperSRX") {
-                                                                               
                                                                        
FirewallProviderArrayIncludesJuniperSRX = true;
-                                                                               
                                                                        break;
-                                                                               
                                                                }
-                                                                               
                                                        }                       
                                                                                
                                                                
-                                                                               
                                                        break;
-                                                                               
                                                }                               
                                                                                
        
-                                                                               
                                        }                                       
                                                                                
                
-                                                                               
                                        
if(FirewallProviderArrayIncludesJuniperSRX == false) {                          
                                                                                
                
-                                                                               
                                                data.push({ name: 'icmp', 
description: 'ICMP' }); //show ICMP option only when provider is not JuniperSRX
-                                                                               
                                        }                                       
                                                                                
                
-                                                                               
                                }
-                                                                               
                        });                     
-                                                                               
                                                                                
                                                
-                          args.response.success({data: data});
+
+                          args.response.success({
+                            data: [
+                              { name: 'tcp', description: 'TCP' },
+                              { name: 'udp', description: 'UDP' },
+                              { name: 'icmp', description: 'ICMP' }
+                            ]
+                          });
                         }
                       },
                       'startport': { edit: true, label: 'label.start.port' },

Reply via email to