Files
harvester-ui-extension/pkg/harvester/pages/c/_cluster
2f72f25b6e feat: improve VNC console with a version gate, in-use screen and confirmations (#1195)
* feat: improve vnc console

Signed-off-by: Andy Lee <andy.lee@suse.com>

* fix: keep VNC console retries from kicking the active session

Builds on "feat: improve vnc console" (#1147) by Andy Lee.

- Keep retrying with preserveSession after a failed reconnect attempt, so a
  displaced console waits for the other session to be released instead of
  failing immediately or taking the console back.
- Close the RFB socket when noVNC asks for credentials, so a failed console
  does not hold the VNC session.
- Restore Custom Shortcut Keys, which were removed in #1147.
- Add unit tests for the console reconnect behavior.

Related: harvester/harvester#10420
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>

* fix: expose VNC quality and compression settings

- Add 0-9 sliders for the JPEG quality and compression level, which were
  already passed to noVNC but could not be changed.
- Mark the connection status as a polite live region so screen readers
  announce connection changes.

Related: harvester/harvester#10420
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>

* fix: gate VNC session protection by version and rework the in-use screen

- Add the vncPreserveSession feature flag for Harvester v1.7.0, the first
  release whose KubeVirt (1.6.3) honours preserveSession. Without it the
  console connects as before, offers no Take Over and does not reconnect on
  its own after the session drops, so two open consoles no longer keep
  kicking each other out.
- Replace the error page with a short card that says when the console is in
  use, and confirm Take Over in a modal instead of window.confirm.
- Keep the overlay text readable on its dark background.
- Show "Connected (view only)", translate the Ctrl+Alt+Del label and remove
  unused translation keys.

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>

* feat: show whether the VNC console has keyboard focus

noVNC hides the canvas focus outline, so nothing showed where typing would go.
Draw a ring around the console while it has focus, show a toolbar hint
("Typing goes to the virtual machine" / "Click the console to type"), focus
the console when it connects and return focus to it after sending keys from
the toolbar.

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>

* feat: confirm Ctrl+Alt+Del and Soft Reboot in the VNC console

Both buttons can restart the virtual machine with one click: Soft Reboot
always, and Ctrl+Alt+Del on most Linux guests. Ask in a modal first, as the
VM list already does for Soft Reboot, and return focus to the console after.

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>

* fix: return focus to the VNC console after its confirm modal closes

The modal gave focus back to the toolbar button that opened it, so typing
did not reach the console until it was clicked again.

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>

* refactor: drop the VNC keyboard focus hint from the toolbar

The ring around the console already shows when it has keyboard focus.

Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Alejandro Bonilla <abonilla@suse.com>
2026-10-21 18:30:27 +02:00
..
2024-11-12 11:50:20 +01:00