mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
webvirtcloud.css still carried the upstream panel's rules for what
Bootstrap 5.3 has as utilities and components:
- the page's bottom space (body padding) is pb-5 on base.html's body,
and the console page no longer has to undo it;
- the VM page's action tabs (.action-button, .action-block with a
fixed 65px width) are text-center with a d-block icon; its tab panes
(#power ... #undefine, one rule each) mt-3;
- the bordered sub-tab panes (.tab-pane-bordered, a fixed #eee border
that dark themes could not change) border border-top-0 p-3;
- the search box and header buttons (.search, .btn-header) m-1 and
mt-1; the SSH key select (.keyselect) a form-select;
- the boot order list (.multipleselect, fixed size, #c0c0c0 border) a
list-group of form-check-input items; its unused .multipleselect-on
goes;
- table cells centred by a global rule are align-middle on each table.
Two rules against Bootstrap's behaviour go: menus opened on hover on
wide screens (Bootstrap opens them on a click, and keyboard and touch
users had no hover), and "a { outline: 0 }", which hid the keyboard
focus ring.
The paragraph and page-header margins and the 900px container stay
for a separate change: they set every page's layout.
85 lines
No EOL
4.2 KiB
HTML
85 lines
No EOL
4.2 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
{% load bootstrap_icons %}
|
|
|
|
{% block title %}{% trans "Interface" %} - {{ iface }}{% endblock %}
|
|
|
|
{% block page_heading %}{% trans "Interface" %}: {{ iface }}{% endblock page_heading %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
{% include "computes/host_nav.html" with section="interfaces" detail=True %}
|
|
</div>
|
|
</div>
|
|
|
|
{% if changeable is False %}{% include 'interfaces_unchangeable.html' %}{% endif %}
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<dl class="ms-3 row">
|
|
<dt class="col-4">{% trans "Interface" %}</dt>
|
|
<dd class="col-8"><strong>{{ iface }}</strong></dd>
|
|
<dt class="col-4">{% trans "IPv4" %} ({% if ipv4 == None %}{% trans 'None' %}{% else %}{{ ipv4_type }}{% endif %})</dt>
|
|
<dd class="col-8">{{ ipv4 }}</dd>
|
|
<dt class="col-4">{% trans "IPv6" %} ({% if ipv6 == None %}{% trans 'None' %}{% else %}{{ ipv6_type }}{% endif %})</dt>
|
|
<dd class="col-8">{{ ipv6 }}</dd>
|
|
<dt class="col-4">{% trans "MAC" %}</dt>
|
|
<dd class="col-8">{{ mac }}</dd>
|
|
<dt class="col-4">{% trans "Interface Type" %}</dt>
|
|
<dd class="col-8">{{ itype }}</dd>
|
|
{% if itype == 'bridge' %}
|
|
<dt class="col-4">{% trans "Bridge Device" %}</dt>
|
|
<dd class="col-8">{{ bridge }}</dd>
|
|
{% endif %}
|
|
<dt class="col-4">{% trans "Boot Mode" %}</dt>
|
|
<dd class="col-8">{{ start_mode }}</dd>
|
|
<dt class="col-4">{% trans "State" %}</dt>
|
|
<dd class="col-8">
|
|
{% if changeable is False %}
|
|
{% if state == 0 %}{% trans "Inactive" %}{% else %}{% trans "Active" %}{% endif %}
|
|
{% else %}
|
|
<form action="" method="post" role="form" aria-label="Interface start/stop/delete form">{% csrf_token %}
|
|
{% if state == 0 %}
|
|
<input type="submit" class="btn btn-sm btn-primary" name="start" value="{% trans "Start" %}">
|
|
<input type="submit" class="btn btn-sm btn-danger" name="delete" value="{% trans "Delete" %}" data-confirm="{% blocktrans with name=iface %}Delete interface {{ name }}? Its definition is removed from the host.{% endblocktrans %}" onclick="return confirm(this.dataset.confirm)">
|
|
{% else %}
|
|
<input type="submit" class="btn btn-sm btn-secondary" name="stop" value="{% trans "Stop" %}" data-confirm="{% blocktrans with name=iface %}Stop interface {{ name }}? The host and its VMs lose their connections through it at once; if you reach the host through it, you lose the host.{% endblocktrans %}" onclick="return confirm(this.dataset.confirm)">
|
|
{% endif %}
|
|
</form>
|
|
{% endif %}
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="col-sm-12">
|
|
<h5>{% trans 'Slaves' %}</h5>
|
|
{% if itype == 'bridge' %}
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">{% trans 'MAC' %}</th>
|
|
<th scope="col">{% trans 'Name' %}</th>
|
|
<th scope="col">{% trans 'Type' %}</th>
|
|
<th scope="col">{% trans 'Speed' %}</th>
|
|
<th scope="col">{% trans 'State' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for iface in slave_ifaces %}
|
|
<tr>
|
|
<td>{{ iface.mac }}</td>
|
|
<td>{{ iface.name }}</td>
|
|
<td>{{ iface.type }}</td>
|
|
<td>{{ iface.speed }}</td>
|
|
<td>{{ iface.state }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %} |