2015-03-03 14:53:10 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
2021-06-15 06:42:55 +00:00
|
|
|
{% load static %}
|
2023-08-09 06:20:18 +00:00
|
|
|
{% load bootstrap_icons %}
|
2020-10-15 14:18:45 +00:00
|
|
|
|
2015-03-03 14:53:10 +00:00
|
|
|
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}
|
2020-10-15 14:18:45 +00:00
|
|
|
|
2020-10-21 09:09:06 +00:00
|
|
|
{% block page_heading %}{{ compute.name }} - {% trans "Interfaces" %}{% endblock page_heading %}
|
2020-10-15 14:18:45 +00:00
|
|
|
|
2021-07-07 11:12:38 +00:00
|
|
|
{% block page_heading_extra %}
|
|
|
|
{% include 'create_iface_block.html' %}
|
|
|
|
{% endblock page_heading_extra %}
|
2020-10-15 14:18:45 +00:00
|
|
|
|
2015-03-03 14:53:10 +00:00
|
|
|
{% block content %}
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
2020-05-19 16:53:54 +00:00
|
|
|
<nav aria-label="breadcrumb">
|
2021-07-07 11:12:38 +00:00
|
|
|
<ol class="breadcrumb shadow-sm">
|
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a href="{% url 'overview' compute.id %}">{% bs_icon 'laptop' %} {% trans "Overview" %}</a>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a href="{% url 'instances' compute.id %}">{% bs_icon 'server' %} {% trans "Instances" %}</a>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a href="{% url 'storages' compute.id %}">{% bs_icon 'device-hdd' %} {% trans "Storages" %}</a>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a href="{% url 'networks' compute.id %}">{% bs_icon 'hdd-network' %} {% trans "Networks" %}</a>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<span class="fw-bold">{% bs_icon 'wifi' %} {% trans "Interfaces" %}</span>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a href="{% url 'nwfilters' compute.id %}">{% bs_icon 'filter' %} {% trans "NWFilters" %}</a>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
2020-05-19 16:53:54 +00:00
|
|
|
<li class="breadcrumb-item">
|
2023-08-09 06:20:18 +00:00
|
|
|
<a href="{% url 'virtsecrets' compute.id %}">{% bs_icon 'key' %} {% trans "Secrets" %}</a>
|
2019-07-31 08:03:48 +00:00
|
|
|
</li>
|
|
|
|
</ol>
|
2020-05-19 16:53:54 +00:00
|
|
|
</nav>
|
2019-07-31 08:03:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-03 14:53:10 +00:00
|
|
|
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="row">
|
|
|
|
{% if not ifaces_all %}
|
|
|
|
<div class="col-lg-12">
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="alert alert-warning shadow-sm">
|
2023-08-09 06:20:18 +00:00
|
|
|
{% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Interfaces" %}
|
2019-07-31 08:03:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
{% for iface in ifaces_all %}
|
2020-05-19 16:53:54 +00:00
|
|
|
<div class="col-12 col-sm-4">
|
2020-06-04 12:40:57 +00:00
|
|
|
<div class="mb-3 card {% if iface.state == 1 %}border-success{% else %}border-danger{% endif %} shadow-sm">
|
|
|
|
<div class="card-header {% if iface.state == 1 %}bg-success{% else %}bg-danger{% endif %}">
|
2020-05-19 16:53:54 +00:00
|
|
|
<h6 class="my-0 card-title">
|
|
|
|
<a class="card-link text-light" href="{% url 'interface' compute.id iface.name %}">{{ iface.name }}</a>
|
|
|
|
</h6>
|
2015-03-05 09:55:15 +00:00
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="ps-0 pe-0 card-body">
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="row">
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="col-3 col-sm-4">
|
2020-05-19 16:53:54 +00:00
|
|
|
<p><strong>{% trans "Type" %}:</strong></p>
|
|
|
|
<p><strong>{% trans "MAC" %}:</strong></p>
|
2015-03-04 13:43:29 +00:00
|
|
|
</div>
|
2021-07-07 11:12:38 +00:00
|
|
|
<div class="col-9 col-sm-8">
|
2019-07-31 08:03:48 +00:00
|
|
|
<p>{{ iface.type }}</p>
|
|
|
|
<p>{{ iface.mac }}</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-04-06 07:51:50 +00:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('#itype').change(function (eventObject) {
|
|
|
|
if ($(this).val() == 'bridge') {
|
|
|
|
$('.bridge_name_form_group').show();
|
|
|
|
} else {
|
|
|
|
$('.bridge_name_form_group').hide();
|
|
|
|
}
|
|
|
|
}).change();
|
|
|
|
$('#ipv4').change(function (eventObject) {
|
|
|
|
if ($(this).val() == 'static') {
|
|
|
|
$('.static_ipv4_form_group').show();
|
|
|
|
} else {
|
|
|
|
$('.static_ipv4_form_group').hide();
|
|
|
|
}
|
|
|
|
}).change();
|
|
|
|
$('#ipv6').change(function (eventObject) {
|
|
|
|
if ($(this).val() == 'static') {
|
|
|
|
$('.static_ipv6_form_group').show();
|
|
|
|
} else {
|
|
|
|
$('.static_ipv6_form_group').hide();
|
|
|
|
}
|
|
|
|
}).change();
|
|
|
|
});
|
|
|
|
</script>
|
2015-03-03 14:53:10 +00:00
|
|
|
{% endblock %}
|