mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 20:26:48 +00:00
Eleven host pages (overview, instances, storages, networks, interfaces, nwfilters, secrets and their item pages) each carried their own copy of the links to the host's sections, as a breadcrumb: the sections are siblings, not a path, and on a phone the separators were left at the start of wrapped lines. The item pages marked no section at all. computes/host_nav.html is the one nav, labelled "Host sections": pills that wrap, the page's section marked active, with aria-current="page" on the section's own page and "true" on an item of it.
49 lines
No EOL
2.2 KiB
HTML
49 lines
No EOL
2.2 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>
|
|
|
|
<div class="row">
|
|
{% if not storages %}
|
|
<div class="col-lg-12">
|
|
<div class="alert alert-warning shadow-sm">
|
|
{% bs_icon 'exclamation-triangle' %} <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Storages" %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
{% for pool in storages %}
|
|
<div class="col-12 col-md-4">
|
|
<div class="mb-3 card {% if pool.status %}border-success{% else %}border-danger{% endif %} shadow-sm">
|
|
<div class="card-header {% if pool.status %}bg-success-subtle{% else %}bg-danger-subtle{% endif %}">
|
|
<h6 class="my-0 card-title">
|
|
<a class="card-link {% if pool.status %}text-success-emphasis{% else %}text-danger-emphasis{% endif %}" href="{% url 'storage' compute.id pool.name %}">{{ pool.name }}</a>
|
|
</h6>
|
|
</div>
|
|
<div class="card-body">
|
|
<dl class="row">
|
|
<dt class="col-6">{% trans "Type" %}</dt>
|
|
<dd class="col-6">{{ pool.type|upper }}</dd>
|
|
<dt class="col-6">{% trans "Size" %}</dt>
|
|
<dd class="col-6">{{ pool.size|filesizeformat }}</dd>
|
|
<dt class="col-6">{% trans "Volumes" %}</dt>
|
|
<dd class="col-6">{{ pool.volumes|default_if_none:"" }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |