mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 19:56:48 +00:00
The label and value rows of the host pages' cards (Overview, storage pools, networks, interfaces) take Bootstrap's py-1 instead of the list group's own padding, as the interface list's cards already do: about half the height a row, the same on every page. A pool's space bar keeps its padding.
64 lines
No EOL
3.5 KiB
HTML
64 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 not storages %}
|
||
<div class="alert alert-warning shadow-sm">
|
||
{% bs_icon 'exclamation-triangle' %} {% trans "This host has no storage pools." %}
|
||
</div>
|
||
{% 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 %} |