mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
IPv6 (#183)
* Removed hollow tag of search * Added support to ICMPv6 and IPv6 Addresses
This commit is contained in:
parent
c24a822fc5
commit
e3270951bf
@ -104,13 +104,13 @@ define(function(require) {
|
||||
|
||||
function _setup(context) {
|
||||
var that = this;
|
||||
|
||||
context.off("change", '.security_group_rule_protocol');
|
||||
context.on("change", '.security_group_rule_protocol', function(){
|
||||
$('.range_row', context).hide();
|
||||
$('.range_row input', context).removeAttr('required');
|
||||
|
||||
$('.icmp_type_wrapper', context).hide();
|
||||
$('.icmpv6_type_wrapper', context).hide();
|
||||
|
||||
switch ($(this).val()) {
|
||||
case "TCP":
|
||||
@ -121,6 +121,9 @@ define(function(require) {
|
||||
case "ICMP":
|
||||
$('.icmp_type_wrapper', context).show();
|
||||
break;
|
||||
case "ICMPv6":
|
||||
$('.icmpv6_type_wrapper', context).show();
|
||||
break;
|
||||
case "IPSEC":
|
||||
case "ALL":
|
||||
break;
|
||||
@ -207,6 +210,14 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
|
||||
if (rule["PROTOCOL"] == "ICMPv6" ){
|
||||
var icmpv6_type_val = WizardFields.retrieveInput($(".security_group_rule_icmpv6_type", context));
|
||||
|
||||
if (icmpv6_type_val != ""){
|
||||
rule["ICMPv6_TYPE"] = icmpv6_type_val;
|
||||
}
|
||||
}
|
||||
|
||||
var text = Utils.sgRuleToSt(rule);
|
||||
|
||||
$(".security_group_rules tbody", context).append(
|
||||
@ -216,6 +227,7 @@ define(function(require) {
|
||||
<td>'+text.RANGE+'</td>\
|
||||
<td>'+text.NETWORK+'</td>\
|
||||
<td>'+text.ICMP_TYPE+'</td>\
|
||||
<td>'+text.ICMPv6_TYPE+'</td>\
|
||||
<td>\
|
||||
<a href="#"><i class="fa fa-times-circle remove-tab"></i></a>\
|
||||
</td>\
|
||||
@ -340,6 +352,7 @@ define(function(require) {
|
||||
<td>'+text.RANGE+'</td>\
|
||||
<td>'+text.NETWORK+'</td>\
|
||||
<td>'+text.ICMP_TYPE+'</td>\
|
||||
<td>'+text.ICMPv6_TYPE+'</td>\
|
||||
<td>\
|
||||
<a href="#"><i class="fa fa-times-circle remove-tab"></i></a>\
|
||||
</td>\
|
||||
@ -348,4 +361,4 @@ define(function(require) {
|
||||
$(".security_group_rules tbody", context).children("tr").last().data("rule", this);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
@ -48,6 +48,7 @@
|
||||
<option value="TCP" selected="selected">{{tr "TCP"}}</option>
|
||||
<option value="UDP">{{tr "UDP"}}</option>
|
||||
<option value="ICMP">{{tr "ICMP"}}</option>
|
||||
<option value="ICMPv6">{{tr "ICMPv6"}}</option>
|
||||
<option value="IPSEC">{{tr "IPsec"}}</option>
|
||||
<option value="ALL">{{tr "All"}}</option>
|
||||
</select>
|
||||
@ -72,6 +73,19 @@
|
||||
<option value = "18">18/0: Address Mask Reply</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-4 columns icmpv6_type_wrapper">
|
||||
<label>{{tr "ICMPv6 Type"}}
|
||||
</label>
|
||||
<select class="security_group_rule_icmpv6_type">
|
||||
<option value="" selected="selected">{{tr "All"}}</option>
|
||||
<option value = "1">1: Destination Unreachable</option>
|
||||
<option value = "2">2/0: Packet too big</option>
|
||||
<option value = "3">3: Time exceeded</option>
|
||||
<option value = "4">4: Parameter problem</option>
|
||||
<option value = "128">128/0: Echo request (ping)</option>
|
||||
<option value = "129">129/0: Echo reply (pong)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row range_row">
|
||||
<div class="medium-4 columns">
|
||||
@ -98,7 +112,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-4 columns security_group_rule_network">
|
||||
<label for="security_group_rule_first_ip">{{tr "First IP address"}}
|
||||
<label for="security_group_rule_first_ip">{{tr "First IP/IPv6 address"}}
|
||||
</label>
|
||||
<input id="security_group_rule_first_ip" type="text" placeholder="192.168.10.1"/>
|
||||
</div>
|
||||
@ -133,6 +147,7 @@
|
||||
<th>{{tr "Port Range"}}</th>
|
||||
<th>{{tr "Network"}}</th>
|
||||
<th>{{tr "ICMP Type"}}</th>
|
||||
<th>{{tr "ICMPv6 Type"}}</th>
|
||||
<th style="width:3%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -142,4 +157,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -18,7 +18,7 @@
|
||||
<div id="{{dataTableSearchId}}-wrapper" class="input-group">
|
||||
<input class="input-group-field" id="{{dataTableSearchId}}" type="search" placeholder="{{tr "Search"}}" />
|
||||
<div class="input-group-button">
|
||||
<button type="button" class="button search-dropdown hollow secondary" data-toggle="{{dataTableSearchId}}-dropdown">
|
||||
<button type="button" class="button search-dropdown secondary" data-toggle="{{dataTableSearchId}}-dropdown">
|
||||
<i class="fa fa-fw fa-caret-down"/>
|
||||
</button>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user