1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 03:36:48 +00:00
webvirtcloud/console/templates/console-base.html
catborise 3a560e9f85 fix(console): a console that cannot open says why and starts no client
A stopped VM, an unreachable or unsupported console and a disabled serial
console rendered the lite VNC page under the error: it connected to novncd
anyway, showed "Something went wrong" and offered keys, Scale and Send
CtrlAltDel for a console that was not there. A refused console was a bare
text 403 inside the popup.

- console-error.html: the console shell with the VM's name and the reason,
  no menu and no script; a refused or unknown VM gets it with 403 and
  without the VM's name, as before for everyone (no superuser exception).
- The view signs the console token only for a page that connects.
- console-menu.html: the Send key(s) menu and Fullscreen, included by the
  console pages; the serial page lists only the keys it sends (the VNC
  groups did nothing there).
- Every console window is titled "<VM> - Console".
- The lite page no longer takes a VNC password from its link.
- The shell lost its 850px x 600px corner radius (a grey arc on the
  serial and error pages) and spans the window (container-fluid).
2026-10-27 07:58:51 +03:00

70 lines
No EOL
2.3 KiB
HTML

{% load static %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="{% static "favicon.ico" %}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if instance %}{{ instance.name }} - {% endif %}{% trans "Console" %}</title>
{# error pages render without app_settings: they get zephyr #}
{% with theme=app_settings.BOOTSTRAP_THEME|default:"zephyr" %}<link rel="stylesheet" href="{% static "css/themes/"|add:theme|add:".min.css" %}" id="wvc_css">{% endwith %}
<link href="{% static "css/webvirtcloud.css" %}" rel="stylesheet">
<style>
body {
padding-bottom: 0;
}
#main_container {
padding: 0;
width: 100%;
max-width: none;
height: 100vh;
display: flex;
flex-direction: column;
background-color: #494949;
}
#main_container canvas {
padding-left: 0;
padding-right: 0;
margin-left: auto;
margin-right: auto;
display: block;
}
</style>
{% block head %}{% endblock %}
</head>
<body>
<div id="main_container">
<nav class="navbar sticky-top navbar-expand-md navbar-dark bg-primary" aria-label="console navbar">
<div class="container-fluid">
<a class="navbar-brand">{{ instance.name }}</a>
{% block navbar %}
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse">
<ul class="navbar-nav me-auto my-2 my-lg-0">
{% block navbarmenu %}{% endblock %}
</ul>
</div>
{% endblock %}
</div>
</nav>
{% block content %}{% endblock %}
</div>
<script src="{% static "js/jquery.js" %}"></script>
<script src="{% static "js/bootstrap.bundle.min.js" %}"></script>
{% block foot %}{% endblock %}
</body>
</html>