mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
Eleven host pages (overview, instances, storages, networks, interfaces, nwfilters, secrets and their item pages) each carried their own copy of the links to the host's sections, as a breadcrumb: the sections are siblings, not a path, and on a phone the separators were left at the start of wrapped lines. The item pages marked no section at all. computes/host_nav.html is the one nav, labelled "Host sections": pills that wrap, the page's section marked active, with aria-current="page" on the section's own page and "true" on an item of it.
82 lines
No EOL
3.3 KiB
HTML
82 lines
No EOL
3.3 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
{% load bootstrap_icons %}
|
|
|
|
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}
|
|
|
|
{% block page_heading %}{{ compute.name }} - {% trans "Interfaces" %}{% endblock page_heading %}
|
|
|
|
{% block page_heading_extra %}
|
|
{% if changeable %}{% include 'create_iface_block.html' %}{% endif %}
|
|
{% endblock page_heading_extra %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
{% include "computes/host_nav.html" with section="interfaces" %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if changeable is False %}{% include 'interfaces_unchangeable.html' %}{% endif %}
|
|
<div class="row">
|
|
{% if not ifaces_all %}
|
|
<div class="col-lg-12">
|
|
<div class="alert alert-warning shadow-sm">
|
|
{% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Interfaces" %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
{% for iface in ifaces_all %}
|
|
<div class="col-12 col-sm-4">
|
|
<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-subtle{% else %}bg-danger-subtle{% endif %}">
|
|
<h6 class="my-0 card-title">
|
|
<a class="card-link {% if iface.state == 1 %}text-success-emphasis{% else %}text-danger-emphasis{% endif %}" href="{% url 'interface' compute.id iface.name %}">{{ iface.name }}</a>
|
|
</h6>
|
|
</div>
|
|
<div class="ps-0 pe-0 card-body">
|
|
<div class="row">
|
|
<div class="col-3 col-sm-4">
|
|
<p><strong>{% trans "Type" %}:</strong></p>
|
|
<p><strong>{% trans "MAC" %}:</strong></p>
|
|
</div>
|
|
<div class="col-9 col-sm-8">
|
|
<p>{{ iface.type }}</p>
|
|
<p>{{ iface.mac }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|
|
{% block script %}
|
|
<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>
|
|
{% endblock %} |