1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00
webvirtcloud/storages/templates/storages.html
catborise a2da2ab394 fix(ui): a host's pages on a phone: one row of sections, tables that fit
On a phone the host's section menu wrapped to three lines, each new line
starting with a divider. It is now one row that scrolls sideways, with the
current section in sight (scroll_rows.js, which also takes over the VM page's
tab rows from instance_page.js).

The filter list, a filter's rules and the PCI and USB device tables were wider
than a phone and hid their actions and users off screen; on a phone they now
keep the name, the key column and the actions, as the other lists do.

The overview's live CPU and memory figures, the chart axes and tooltips, and
the VM page's stats now write numbers as the page's language does (a decimal
comma in Turkish), like the cards beside them.

The capacity cards said "0 bytes running"; they now say what they count:
"0 bytes in running VMs".

A pool's type is written as libvirt names it on both the list and its page,
and the device search sits where the interfaces search does.
2026-11-22 14:59:17 +03:00

62 lines
No EOL
3.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% load i18n %}
{% load bootstrap_icons %}
{% block title %}{% trans "Storages" %} - {{ compute.name }}{% endblock %}
{% block page_heading %}{{ compute.name }} - {% trans "Storages" %}{% endblock page_heading %}
{% block page_heading_extra %}{% include 'create_stg_block.html' %}{% endblock page_heading_extra %}
{% block content %}
<div class="row">
<div class="col-lg-12">
{% include "computes/host_nav.html" with section="storages" %}
</div>
</div>
{% if storages is None %}{# not read: the error above says why #}{% elif not storages %}
<p class="text-center text-body-secondary py-4">{% trans "This host has no storage pools." %}</p>
{% else %}
{# a card per pool, as the host Overview's Hardware and Software cards #}
<div class="row row-cols-1 row-cols-md-2 g-3 mb-4">
{% for pool in storages %}
<div class="col">
<div class="card h-100">
<div class="card-header d-flex flex-wrap align-items-center gap-2">
<a class="fw-semibold me-auto text-break" href="{% url 'storage' compute.id pool.name %}">{{ pool.name }}</a>
{% if pool.status %}
<span class="badge text-bg-success">{% trans "Active" %}</span>
{% else %}
<span class="badge text-bg-secondary">{% trans "Stopped" %}</span>
{% endif %}
{% if pool.autostart %}<span class="badge text-bg-light border">{% trans "Autostart" %}</span>{% endif %}
</div>
<ul class="list-group list-group-flush flex-grow-1">
<li class="list-group-item py-1 d-flex justify-content-between align-items-baseline gap-3">
<span class="text-body-secondary">{% trans "Type" %}</span>
<span class="badge text-bg-light border">{{ pool.type }}</span>
</li>
<li class="list-group-item py-1 d-flex justify-content-between align-items-baseline gap-3">
<span class="text-body-secondary">{% trans "Path" %}</span>
<span class="small font-monospace text-end text-break">{{ pool.path|default:"–" }}</span>
</li>
<li class="list-group-item py-1 d-flex justify-content-between align-items-baseline gap-3">
<span class="text-body-secondary">{% trans "Volumes" %}</span>
<span class="fw-semibold">{% if pool.status %}{{ pool.volumes }}{% else %}–{% endif %}</span>
</li>
{# the space of what the pool stores in: its filesystem, volume group or cluster, which other pools may share #}
<li class="list-group-item">
{% if pool.status and pool.size %}
{% include "computes/pool_bar.html" with hide_name=True %}
{% else %}
<span class="small text-body-secondary">{% if pool.status %}{% trans "No size" %}{% else %}{% trans "Space unavailable while stopped" %}{% endif %}</span>
{% endif %}
</li>
</ul>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}