mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
Each host is a row of what it has committed, read live from the host (in parallel, by a 10 s deadline): - Host: a status dot, the name, its address and details; when it cannot be reached, why. - vCPUs: the overcommit ratio, large (warning above 2:1, red above 4:1), over "N vCPUs on M CPUs" and the running VMs' share. - Memory: memory given to all VMs against the host's memory, as one bar: running VMs dark, shut-off VMs light (they take their memory again when they start), and a line where the host's memory ends; red when the VMs were given more than the host has. - Storage: the default pool (or the first) with its used share and free space; the others, a host may have dozens, open on a click. A host that cannot be reached, or does not answer in time, says so in one line instead. vCPUs and Memory sort by ratio and share. A host whose read hangs is not read again until that read ends, so a stuck host keeps at most one thread. The table's hidden status texts stay inside it, so the page does not widen on a phone.
6 lines
627 B
HTML
6 lines
627 B
HTML
{% load i18n %}
|
|
<div class="small">{{ pool.name }}</div>
|
|
<div class="cap-bar cap-thin my-1" role="img" aria-label="{% blocktrans with name=pool.name percent=pool.used_percent|floatformat:0 %}{{ name }} {{ percent }}% used{% endblocktrans %}">
|
|
<div class="cap-running {% if pool.used_percent > 90 %}bg-danger{% elif pool.used_percent > 75 %}bg-warning{% endif %}" style="width: {{ pool.used_percent|stringformat:".1f" }}%"></div>
|
|
</div>
|
|
<div class="small text-body-secondary text-nowrap">{% blocktrans with free=pool.free|filesizeformat size=pool.size|filesizeformat %}{{ free }} free of {{ size }}{% endblocktrans %}</div>
|