diff --git a/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js b/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js index dfb7ec8903..6883eadb6b 100644 --- a/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js +++ b/src/sunstone/public/app/tabs/secgroups-tab/utils/common.js @@ -49,6 +49,9 @@ define(function(require) { case "ICMP": text["PROTOCOL"] = Locale.tr("ICMP"); break; + case "ICMPV6": + text["PROTOCOL"] = Locale.tr("ICMPv6") + break; case "IPSEC": text["PROTOCOL"] = Locale.tr("IPsec"); break; @@ -83,6 +86,12 @@ define(function(require) { text["ICMP_TYPE"] = ""; } + if(rule.ICMPv6_TYPE != undefined){ + text["ICMPv6_TYPE"] = _icmpv6ToSt(rule.ICMPv6_TYPE); + } else { + text["ICMPv6_TYPE"] = ""; + } + if(rule.RANGE != undefined && rule.RANGE != ""){ text["RANGE"] = rule.RANGE; } else { @@ -155,6 +164,19 @@ define(function(require) { } } + function _icmpv6ToSt(icmpv6_type){ + switch( icmpv6_type){ + case "": return Locale.tr("All"); + case "1": return "1: Destination Unreachable"; + case "2": return "2/0: Packet too long"; + case "3": return "3: Time exceeded"; + case "4": return "4: Parameter problem"; + case "128": return "128/0: Echo request (ping)"; + case "129": return "129/0: Echo reply (pong)"; + default: return "" + icmpv6_type; + } + } + /* @param {Object} info Object representing the Security Group as returned by OpenNebula */