2015-03-06 11:59:27 +00:00
|
|
|
{% load i18n %}
|
2023-08-09 06:20:18 +00:00
|
|
|
{% load bootstrap_icons %}
|
2015-03-03 09:34:09 +00:00
|
|
|
{% if request.user.is_superuser %}
|
2021-07-07 11:12:38 +00:00
|
|
|
<a href="#AddNetPool" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
|
2023-08-09 06:20:18 +00:00
|
|
|
<span aria-hidden="true">{% bs_icon 'plus' %} </span>
|
2015-03-06 11:59:27 +00:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<!-- Modal pool -->
|
|
|
|
<div class="modal fade" id="AddNetPool" tabindex="-1" role="dialog" aria-labelledby="AddNetPoolLabel" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2020-05-19 16:53:54 +00:00
|
|
|
<h5 class="modal-title">{% trans "Add New Network" %}</h5>
|
2021-07-07 11:12:38 +00:00
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
2015-03-06 11:59:27 +00:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2020-05-26 13:18:38 +00:00
|
|
|
<form method="post" action="" role="form" aria-label="Add New Network form" novalidate>{% csrf_token %}
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "Name" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
2020-06-10 12:16:58 +00:00
|
|
|
<input type="text" class="form-control" name="name" placeholder="{% trans "default" %}" required pattern="[a-zA-Z0-9_]+">
|
2015-03-06 11:59:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "Type forwarding" %}</label>
|
2019-11-08 15:26:47 +00:00
|
|
|
<div class="col-sm-6">
|
2021-07-07 11:12:38 +00:00
|
|
|
<select id="forward_select" class="form-select" name="forward">
|
2019-11-08 15:26:47 +00:00
|
|
|
<option value="nat">{% trans "NAT" %}</option>
|
|
|
|
<option value="route">{% trans "ROUTE" %}</option>
|
|
|
|
<option value="none">{% trans "ISOLATE" %}</option>
|
|
|
|
<option value="bridge">{% trans "BRIDGE" %}</option>
|
2020-07-21 11:56:00 +00:00
|
|
|
<option value="macvtap">{% trans "MACVTAP" %}</option>
|
2019-11-08 15:26:47 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "IPv4 Subnet pool" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
2019-11-08 15:26:47 +00:00
|
|
|
<input type="text" class="form-control" name="subnet" value="" placeholder="192.168.100.0/24" required pattern="[0-9\/\.]+">
|
2015-03-06 11:59:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "DHCPv4" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
2019-11-07 11:07:57 +00:00
|
|
|
<input type="checkbox" name="dhcp4" value="true" checked>
|
2015-03-06 11:59:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row bridge_name_form_group_dhcp">
|
2020-06-10 08:15:14 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "Fixed Addresses" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<input type="checkbox" name="fixed" value="true">
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row bridge_name_form_group_dhcp">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "Enable IPv6" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
2019-11-08 15:26:47 +00:00
|
|
|
<input type="checkbox" id="enable_ipv6" name="enable_ipv6" value="false">
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row ipv6_group">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "IPv6 Subnet pool" %}</label>
|
2019-11-08 15:26:47 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<input type="text" class="form-control" name="subnet6" value="" placeholder="fd00:dead:baba:1::/64" required pattern="[0-9\/\.]+">
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row ipv6_group">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "DHCPv6" %}</label>
|
2019-11-08 15:26:47 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<input type="checkbox" name="dhcp6" value="true">
|
2015-03-06 11:59:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row bridge_name_form_group">
|
2020-07-21 11:56:00 +00:00
|
|
|
<label class="col-sm-4 col-form-label" id="bridge_label">{% trans "Bridge Name" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
2020-07-21 11:56:00 +00:00
|
|
|
<input type="text" class="form-control" name="bridge_name" id="bridge_name" placeholder="br0" pattern="[a-z0-9\-_:]+">
|
2015-03-06 11:59:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="row bridge_name_form_group openvswitch">
|
2020-05-19 16:53:54 +00:00
|
|
|
<label class="col-sm-4 col-form-label">{% trans "Open vSwitch" %}</label>
|
2015-03-06 11:59:27 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
<input type="checkbox" name="openvswitch" value="true">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2021-07-07 11:12:38 +00:00
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Close" %}</button>
|
2015-03-06 11:59:27 +00:00
|
|
|
<button type="submit" class="btn btn-primary" name="create">{% trans "Create" %}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div> <!-- /.modal-content -->
|
|
|
|
</div> <!-- /.modal-dialog -->
|
|
|
|
</div> <!-- /.modal -->
|
2020-07-21 11:56:00 +00:00
|
|
|
{% endif %}
|
|
|
|
|