mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 20:26:48 +00:00
- Totals above the list: hosts connected of all, VMs running of all, vCPUs given on the CPUs, memory given of the memory of the hosts the panel reads, as cards; the connected count is red while a host is not. - A host's name links its overview; its state is a Connected or Not connected badge (the dot goes), beside a badge of how the panel reaches it (TCP, SSH, TLS, Socket); its address in monospace. - A VMs column: the host's VMs, linked to its Instances, and how many run. - The vCPUs have a bar like the memory's: running VMs' and shut-off VMs' vCPUs against the CPUs, amber over 2:1 and red over 4:1 as the ratio is; the overview's vCPU card shares it. - The three coloured buttons of each row are one menu: Overview, Edit connection and Remove from panel (its popper fixed, as the table's scrolling box would cut it off). - The four green add buttons are one "Add host" menu that says what each kind of connection is. - The table is table-hover; a host the panel cannot reach has a table-warning row.
18 lines
2.1 KiB
HTML
18 lines
2.1 KiB
HTML
{% load i18n %}
|
|
{# the vCPUs a host has given its VMs: given, from views.shown_capacity #}
|
|
<div class="fs-4 lh-sm {% if given.ratio > 4 %}text-danger{% elif given.ratio > 2 %}text-warning-emphasis{% endif %}">{{ given.ratio|floatformat:1 }}:1</div>
|
|
<div class="small text-body-secondary mb-1">{% blocktrans count counter=given.vcpus.all %}{{ counter }} vCPU{% plural %}{{ counter }} vCPUs{% endblocktrans %} {% blocktrans count counter=given.cpus %}on {{ counter }} CPU{% plural %}on {{ counter }} CPUs{% endblocktrans %}</div>
|
|
{# running VMs' vCPUs, then shut-off VMs', on a scale that holds the CPUs or all given, whichever is more #}
|
|
<div class="progress-stacked" style="--bs-progress-height: 0.6rem;" title="{% trans "Dark: running VMs. Light: shut-off VMs, which take their vCPUs again when they start." %}">
|
|
<div class="progress" role="progressbar" style="width: {{ given.cpu_bar.running|stringformat:".1f" }}%"
|
|
aria-label="{% trans "vCPUs of running VMs" %}" aria-valuenow="{{ given.cpu_bar.running|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100"
|
|
aria-valuetext="{% blocktrans with running=given.vcpus.running cpus=given.cpus %}{{ running }} of the host's {{ cpus }} CPUs{% endblocktrans %}">
|
|
<div class="progress-bar {% if given.ratio > 4 %}bg-danger{% elif given.ratio > 2 %}bg-warning{% else %}bg-primary{% endif %}"></div>
|
|
</div>
|
|
<div class="progress" role="progressbar" style="width: {{ given.cpu_bar.stopped|stringformat:".1f" }}%"
|
|
aria-label="{% trans "vCPUs of shut-off VMs" %}" aria-valuenow="{{ given.cpu_bar.stopped|floatformat:0 }}" aria-valuemin="0" aria-valuemax="100"
|
|
aria-valuetext="{% blocktrans with stopped=given.vcpus.stopped cpus=given.cpus %}{{ stopped }} of the host's {{ cpus }} CPUs{% endblocktrans %}">
|
|
<div class="progress-bar {% if given.ratio > 4 %}bg-danger{% elif given.ratio > 2 %}bg-warning{% else %}bg-primary{% endif %} bg-opacity-50"></div>
|
|
</div>
|
|
</div>
|
|
<div class="small text-body-secondary mt-1">{% blocktrans with running=given.vcpus.running %}{{ running }} running{% endblocktrans %}</div>
|