mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
The console page of a VM whose host does not answer said "Fail to get console. Please check the console configuration of your VM." and logged nothing. It now shows the connection error (to users who do not see the hosts, that the host cannot be reached) and logs it with the VM and host. A host's Storage, Networks, Interfaces, Filters and Secrets pages showed the connection error and also "This host has no ...". The list is None when it was not read, and the page shows only the error.
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 storages is None %}{# not read: the error above says why #}{% elif 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 %} |