1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-01 16:36:06 +00:00

fix(instances): the VM page says when its host stops answering

The VM page polls the VM's state every 5 s and reloads when it changes.
When the host stopped answering, the poll failed and nothing changed on
the page: it kept showing the last state, figures and actions as if they
were current. A notice now says that the page could not be refreshed and
may be out of date while the poll fails (a host that does not answer, a
session that ended); it goes away with the next answer. Checked on
compute1 in headless Chromium with its libvirt port dropped and restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-10 10:58:12 +03:00
parent 6cdda6d4f3
commit 139e43e4c4
7 changed files with 358 additions and 335 deletions

View file

@ -43,6 +43,8 @@
<a class="btn btn-sm btn-secondary" href="{% url 'instances:instance' instance.id %}">{% bs_icon 'arrow-clockwise' %} {% trans "Refresh" %}</a>
</div>
</div>
{# shown by instance_status.js while the VM's state cannot be read #}
<div class="alert alert-warning small py-2 mt-2 mb-0" id="vm-host-lost" role="status" hidden>{% trans "This page could not be refreshed: its state and figures may be out of date." %}</div>
{% if not instance.is_template %}
<div class="d-flex flex-wrap column-gap-3 row-gap-1 small mt-2">
{% if not instance.guest_agent %}