mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
The VM page offered a lite and a full VNC console. Lite lacked a clipboard, display settings and a way to reconnect; full put noVNC's own side bar under the panel's bar, with a Fullscreen item that called a function noVNC does not have, status messages hidden behind the bar, saved noVNC settings that overrode the Access tab's, connection settings that cannot apply, and a Connect button that reused the page's two-minute token and failed. console-vnc.html and static/js/console_vnc.js replace both, on noVNC's RFB with Bootstrap controls, and keep what the full view did: - Status in the bar (Connecting, Connected, Disconnected, Connection lost, Could not connect, Authentication failed with the server's reason on hover); Disconnect, then Reconnect, which loads the page again for a new token. - The VNC password in a dialog (with a username when the server asks for one), not a browser prompt; without passwordless console it is not in the page. - Send key(s) gains Hold Ctrl / Alt / Windows (noVNC's extra keys). - Clipboard: what the VM copies, sending text to the VM's clipboard, and typing it key by key (new: works in firmware, installers and login prompts; Shift for the characters a US keyboard shifts, 25 ms a key as firmware drops faster keys, verified in a UEFI shell). - View: scaling (none, fit, resize the VM's screen), clip, drag a clipped screen, view only, dot cursor, quality, compression; it starts as Settings > Console says (a touch screen starts fitted). - A Keyboard item on touch devices (noVNC's on-screen keyboard input, key events and Android's text-only input), Fullscreen with keyboard lock, the bell. Dropped with the full view: noVNC's websocket host/port/path, repeater ID and log level (the panel fixes them), automatic reconnect (the token is single use in time), XVP power buttons (QEMU has no XVP) and shared-mode off. The bar is compact (about 45 px in the 850x600 window). The Access tab has one Console button instead of the Lite/Full split and four switches, and it and the VM list open one window per VM (opening it again reloads it).
58 lines
4 KiB
HTML
58 lines
4 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 overflow-auto" aria-labelledby="dropdownMenuLink" style="min-width: 250px; max-height: calc(100dvh - 4rem);">
|
|
{% 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>
|
|
<div class="dropdown-divider"></div>
|
|
<h6 class="dropdown-header">{% trans "Hold until chosen again" %}</h6>
|
|
<a class="dropdown-item" id="holdctrl" href="#" role="button" aria-pressed="false">Ctrl</a>
|
|
<a class="dropdown-item" id="holdalt" href="#" role="button" aria-pressed="false">Alt</a>
|
|
<a class="dropdown-item" id="holdsuper" href="#" role="button" aria-pressed="false">Windows / Super Key</a>
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
<li class="nav-item" id="fullscreen_button">
|
|
<a class="nav-link" href="#">{% trans "Fullscreen" %}</a>
|
|
</li>
|