1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 03:36:48 +00:00
webvirtcloud/console/templates/console-menu.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

53 lines
3.5 KiB
HTML

{% load i18n %}
{# the console pages' Send key(s) menu and Fullscreen; serial: only the keys a terminal takes #}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" role="button"
id="dropdownMenuLink" aria-haspopup="true" aria-expanded="false">
{% trans "Send key(s)" %}
</a>
<div class="dropdown-menu shadow" aria-labelledby="dropdownMenuLink" style="min-width: 250px;">
{% if not serial %}
<h6 class="dropdown-header">{% trans "System" %}</h6>
<a class="dropdown-item" id="ctrlaltdel" href="#">Ctrl+Alt+Del</a>
<a class="dropdown-item" id="ctrlaltbackspace" href="#">Ctrl+Alt+Backspace</a>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">{% trans "Navigation & Desktop" %}</h6>
<a class="dropdown-item" id="alttab" href="#">Alt+Tab</a>
<a class="dropdown-item" id="superkey" href="#">Windows / Super Key</a>
<a class="dropdown-item" id="sendesc" href="#">Escape</a>
<a class="dropdown-item" id="sendtab" href="#">Tab</a>
<div class="dropdown-divider"></div>
{% endif %}
<h6 class="dropdown-header">{% trans "Terminal Control" %}</h6>
<a class="dropdown-item" id="ctrlc" href="#">Ctrl+C</a>
<a class="dropdown-item" id="ctrlz" href="#">Ctrl+Z</a>
<a class="dropdown-item" id="ctrld" href="#">Ctrl+D</a>
<a class="dropdown-item" id="ctrlbackslash" href="#">Ctrl+\</a>
{% if serial %}
<a class="dropdown-item" id="sendesc" href="#">Escape</a>
<a class="dropdown-item" id="sendtab" href="#">Tab</a>
{% else %}
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">{% trans "Virtual Consoles (Ctrl+Alt+F#)" %}</h6>
<div class="px-3 py-1">
<div class="row g-1 text-center">
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf1" href="#">F1</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf2" href="#">F2</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf3" href="#">F3</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf4" href="#">F4</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf5" href="#">F5</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf6" href="#">F6</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf7" href="#">F7</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf8" href="#">F8</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf9" href="#">F9</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf10" href="#">F10</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf11" href="#">F11</a></div>
<div class="col-3"><a class="btn btn-sm btn-outline-secondary w-100 py-1" id="ctrlaltf12" href="#">F12</a></div>
</div>
</div>
{% endif %}
</div>
</li>
<li class="nav-item" id="fullscreen_button">
<a class="nav-link" href="#">{% trans "Fullscreen" %}</a>
</li>