1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 20:14:15 +00:00
webvirtcloud/interfaces/templates/create_iface_block.html

145 lines
9.1 KiB
HTML
Raw Normal View History

2015-03-06 11:59:27 +00:00
{% load i18n %}
2015-03-03 09:34:09 +00:00
{% if request.user.is_superuser %}
2020-05-19 16:53:54 +00:00
<a href="#AddInterface" type="button" class="btn btn-success float-right" data-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
2015-03-06 11:59:27 +00:00
</a>
<!-- Modal Secret -->
<div class="modal fade" id="AddInterface" tabindex="-1" role="dialog" aria-labelledby="AddInterface" 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 "Create New Interface" %}</h5>
2015-03-06 11:59:27 +00:00
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
2020-05-26 13:18:38 +00:00
<form method="post" action="" role="form" aria-label="Create New Interface form">{% csrf_token %}
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Name" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
<input type="text" name="name" class="form-control" placeholder="br0" maxlength="10" required pattern="[a-z0-9\. ]+"/>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Start mode" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select name="start_mode" class="custom-select">
2015-03-06 11:59:27 +00:00
<option value="none">{% trans "none" %}</option>
<option value="onboot">{% trans "onboot" %}</option>
<option value="hotplug">{% trans "hotplug" %}</option>
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Device" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select name="netdev" class="custom-select">
2015-03-06 11:59:27 +00:00
{% for dev in netdevs %}
<option value="{{ dev }}">{{ dev }}</option>
{% endfor %}
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Type" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select name="itype" class="custom-select" id="itype">
2015-03-06 11:59:27 +00:00
<option value="bridge">{% trans "bridge" %}</option>
<option value="ethernet">{% trans "ethernet" %}</option>
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row bridge_name_form_group">
<label class="col-sm-3 col-form-label">{% trans "STP" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select name="stp" class="custom-select">
2015-03-06 11:59:27 +00:00
<option value="on">{% trans "on" %}</option>
<option value="off">{% trans "off" %}</option>
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row bridge_name_form_group">
<label class="col-sm-3 col-form-label">{% trans "Delay" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
<input type="text" name="delay" class="form-control" value="0" maxlength="3" required pattern="[0-9]+"/>
</div>
</div>
<div class="tabbable">
2020-05-26 13:18:38 +00:00
<ul class="nav nav-tabs" aria-label="IP types">
2020-05-19 16:53:54 +00:00
<li class="nav-item">
<a class="nav-link active" href="#ipv4tab" data-toggle="tab">{% trans "IPv4" %}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#ipv6tab" data-toggle="tab">{% trans "IPv6" %}</a>
2015-03-06 11:59:27 +00:00
</li>
</ul>
</div>
<div class="tab-content">
2020-05-19 16:53:54 +00:00
<div class="tab-pane active" id="ipv4tab">
2015-03-06 11:59:27 +00:00
<div class="modal-body">
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "IPv4 Mode" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select name="ipv4_type" class="custom-select" id="ipv4">
2015-03-06 11:59:27 +00:00
<option value="dhcp">{% trans "DHCP" %}</option>
<option value="static">{% trans "Static" %}</option>
<option value="none">{% trans "No configuration" %}</option>
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row static_ipv4_form_group">
<label class="col-sm-3 col-form-label">{% trans "IPv4 Address" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
<input type="text" class="form-control" name="ipv4_addr" maxlength="19" pattern="[0-9\.\/]+">
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row static_ipv4_form_group">
<label class="col-sm-3 col-form-label">{% trans "IPv4 Gateway" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
<input type="text" class="form-control" name="ipv4_gw" maxlength="16" pattern="[0-9\.]+">
</div>
</div>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="tab-pane" id="ipv6tab">
2015-03-06 11:59:27 +00:00
<div class="modal-body">
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "IPv6 Mode" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select name="ipv6_type" class="custom-select" id="ipv6">
2015-03-06 11:59:27 +00:00
<option value="none">{% trans "No configuration" %}</option>
<option value="dhcp">{% trans "DHCP" %}</option>
<option value="static">{% trans "Static" %}</option>
</select>
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row static_ipv6_form_group">
<label class="col-sm-3 col-form-label">{% trans "IPv6 Address" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
<input type="text" class="form-control" name="ipv6_addr" maxlength="100" pattern="[0-9a-f\:\/]+">
</div>
</div>
2020-05-19 16:53:54 +00:00
<div class="form-group row static_ipv6_form_group">
<label class="col-sm-3 col-form-label">{% trans "IPv6 Gateway" %}</label>
2015-03-06 11:59:27 +00:00
<div class="col-sm-6">
<input type="text" class="form-control" name="ipv6_gw" maxlength="100" pattern="[0-9a-f\:]+">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
2020-05-19 16:53:54 +00:00
<button type="button" class="btn btn-secondary" data-dismiss="modal">
2015-03-06 11:59:27 +00:00
{% trans "Close" %}
</button>
<button type="submit" class="btn btn-primary" name="create">
{% trans "Create" %}
</button>
</div>
</form>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div><!-- /.modal -->
2015-03-03 09:34:09 +00:00
{% endif %}