2015-03-03 14:53:10 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
2015-03-04 13:43:29 +00:00
|
|
|
{% block title %}{% trans "Networks" %} - {{ compute.name }}{% endblock %}
|
2015-03-03 14:53:10 +00:00
|
|
|
{% block content %}
|
2019-07-31 08:03:48 +00:00
|
|
|
<!-- Page Heading -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
{% include 'create_net_block.html' %}
|
|
|
|
<h1 class="page-header">{{ compute.name }}</h1>
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li class="active">
|
|
|
|
<i class="fa fa-dashboard"></i> <a href="{% url 'overview' compute.id %}">{% trans "Overview" %}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-server"></i> <a href="{% url 'instances' compute.id %}">{% trans "Instances" %}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-hdd-o"></i> <a href="{% url 'storages' compute.id %}">{% trans "Storages" %}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-sitemap"></i> {% trans "Networks" %}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-wifi"></i> <a href="{% url 'interfaces' compute.id %}">{% trans "Interfaces" %}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-filter"></i> <a href="{% url 'nwfilters' compute.id %}">{% trans "NWFilters" %}</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-key"></i> <a href="{% url 'secrets' compute.id %}">{% trans "Secrets" %}</a>
|
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
2015-03-03 14:53:10 +00:00
|
|
|
|
2019-07-31 08:03:48 +00:00
|
|
|
{% include 'errors_block.html' %}
|
2015-03-03 14:53:10 +00:00
|
|
|
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="row">
|
|
|
|
{% if not networks %}
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="alert alert-warning alert-dismissable">
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
2019-11-08 15:26:47 +00:00
|
|
|
<i class="fa fa-exclamation-triangle"></i><strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any network" %}
|
2019-07-31 08:03:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
{% for pool in networks %}
|
|
|
|
<div class="col-xs-12 col-sm-4">
|
|
|
|
<div class="panel {% if pool.status %}panel-success{% else %}panel-danger{% endif %} panel-data">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title"><a href="{% url 'network' compute.id pool.name %}">{{ pool.name }}</a></h3>
|
2015-03-05 09:55:15 +00:00
|
|
|
</div>
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="panel-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-4 col-sm-4">
|
2019-11-08 15:26:47 +00:00
|
|
|
<p><strong>{% trans "Device" %}:</strong></p>
|
|
|
|
<p><strong>{% trans "Forward" %}:</strong></p>
|
2015-03-04 13:43:29 +00:00
|
|
|
</div>
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="col-xs-6 col-sm-7">
|
|
|
|
<p>{{ pool.device }}</p>
|
|
|
|
<p>{{ pool.forward|upper }}</p>
|
2015-03-04 13:43:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-31 08:03:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2015-03-06 11:59:27 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block script %}
|
2015-03-06 13:06:29 +00:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('#forward_select').change(function (eventObject) {
|
|
|
|
if ($(this).val() == 'bridge') {
|
|
|
|
$('.bridge_name_form_group').show();
|
|
|
|
$('.bridge_name_form_group_dhcp').hide();
|
|
|
|
} else {
|
|
|
|
$('.bridge_name_form_group').hide();
|
|
|
|
$('.bridge_name_form_group_dhcp').show();
|
|
|
|
}
|
|
|
|
}).change();
|
2019-11-08 15:26:47 +00:00
|
|
|
|
|
|
|
$('#enable_ipv6').change(function (eventObject) {
|
|
|
|
if ($(this).is(':checked')) {
|
|
|
|
$('.ipv6_group').show();
|
|
|
|
} else {
|
|
|
|
$('.ipv6_group').hide();
|
|
|
|
}
|
|
|
|
}).change();
|
2015-03-06 13:06:29 +00:00
|
|
|
});
|
|
|
|
</script>
|
2015-03-03 14:53:10 +00:00
|
|
|
{% endblock %}
|