1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-01 16:36:06 +00:00
webvirtcloud/console/templates/console-xterm.html
catborise 16ad625cda fix(console): a console the server closes says Connection lost, not Disconnected
The VNC and serial pages showed "Disconnected", as if the user had ended
the session, when the VM stopped, was migrated or the console daemon
restarted: noVNC calls a close by the server clean, and the serial page
had a single text. "Disconnected" is now kept for the user's own
Disconnect; any other end of a working connection is "Connection lost"
(the serial terminal still prints the server's reason).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
2026-11-10 19:01:21 +03:00

31 lines
1.3 KiB
HTML

{% extends "console-base.html" %}
{% load i18n %}
{% load static %}
{% block head %}
<link rel="stylesheet" href="{% static 'css/xterm.css' %}"/>
<script src="{% static 'js/xterm/xterm.js' %}"></script>
<script src="{% static 'js/xterm/addon-fit.js' %}"></script>
<script src="{% static 'js/socket.io.js' %}"></script>
{{ token|json_script:"serial-token" }}
<script type="module" src="{% static "js/console_serial.js" %}"></script>
{% endblock %}
{% block navbarstatus %}
<span id="status" class="badge text-bg-secondary" role="status"
data-connected="{% trans "Connected" %}" data-disconnected="{% trans "Disconnected" %}"
data-lost="{% trans "Connection lost" %}"
data-taken-over="{% trans "Taken over by %(name)s" %}"
data-hint="{% trans "Connected. If the VM shows nothing, press Enter." %}">{% trans "Connecting" %}</span>
{% endblock %}
{% block navbarmenu %}{% include "console-menu.html" with serial=True %}{% endblock %}
{% block navbarend %}
<button type="button" class="btn btn-sm btn-light" id="connection_button"
data-disconnect="{% trans "Disconnect" %}" data-reconnect="{% trans "Reconnect" %}">{% trans "Disconnect" %}</button>
{% endblock %}
{% block content %}
<div id="terminal" class="flex-grow-1 bg-black" style="min-height: 0;"></div>
{% endblock %}