From a1b6ff59a23bac705bb3ed06c6af2526809e125a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= <cmartin@opennebula.org>
Date: Thu, 20 Nov 2014 16:05:53 +0100
Subject: [PATCH] Feature #3175: New SG protocol "all" in sunstone

---
 src/sunstone/public/js/plugins/secgroups-tab.js | 2 ++
 src/sunstone/public/js/sunstone.js              | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/sunstone/public/js/plugins/secgroups-tab.js b/src/sunstone/public/js/plugins/secgroups-tab.js
index 930e2c1d8d..55cc5b2642 100644
--- a/src/sunstone/public/js/plugins/secgroups-tab.js
+++ b/src/sunstone/public/js/plugins/secgroups-tab.js
@@ -33,6 +33,7 @@ function initialize_create_security_group_dialog(dialog){
             $('.icmp_type_wrapper', dialog).show();
             break;
         case "IPSEC":
+        case "ALL":
             $('.range_row', dialog).hide();
             $('.icmp_type_wrapper', dialog).hide();
             break;
@@ -370,6 +371,7 @@ var create_security_group_wizard_html =
           <option value="UDP">'+tr("UDP")+'</option>\
           <option value="ICMP">'+tr("ICMP")+'</option>\
           <option value="IPSEC">'+tr("IPsec")+'</option>\
+          <option value="ALL">'+tr("All")+'</option>\
         </select>\
       </div>\
       <div class="medium-4 columns icmp_type_wrapper">\
diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js
index c4ec7936f5..b7e475e4ab 100644
--- a/src/sunstone/public/js/sunstone.js
+++ b/src/sunstone/public/js/sunstone.js
@@ -7048,6 +7048,9 @@ function sg_rule_to_st(rule){
         case "IPSEC":
             text["PROTOCOL"] = tr("IPsec");
             break;
+        case "ALL":
+            text["PROTOCOL"] = tr("All");
+            break;
         default:
             text["PROTOCOL"] = "";
         }