mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
- An empty list says so in gray text, as the VM list does, not in a yellow warning or a blue notice (host pools, networks, filters, secrets, interfaces, tags, removed VMs, backups, schedules, targets). - The Jobs and Backups filters show only while there is something to filter. - The Jobs, Backups and Logs filters apply once a choice changes or Enter is pressed (filter_form.js): no Filter or Search button, and Clear the filters only while one is set. - On a phone the Logs table shows the date, user, VM and message, with the result under it, and the Computes table the host and its memory.
62 lines
No EOL
3.5 KiB
HTML
62 lines
No EOL
3.5 KiB
HTML
{% 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|upper }}</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 %} |