* fix: show the VNC console's dialogs in full screen
Only the console went full screen and dialogs render outside of it, so the
Ctrl+Alt+Del and Soft Reboot confirmations, among others, stayed hidden behind
it until full screen was left. Put the whole page in full screen instead.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: bring back deleting saved VNC console shortcut keys
The Vue 3 migration dropped the close button from the list of saved shortcuts,
which left no way to delete one. Restore it, and remove by position in the list:
the old code parsed the displayed HTML to find the shortcut, which cannot match
one with the Space key in it, such as Ctrl+Space.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: tidy the VNC console's custom shortcut keys
Give the saved shortcuts in the menu the same space as the separator above
them, and name the dialog's buttons Cancel and Save, which say what they do.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
(cherry picked from commit 73eaccc2ad)
* chore(deps): bump @rancher/shell to 3.0.14
3.0.14 resolves [[name]] tokens in translations from values registered
as l10n globals, which the standalone UI needs to pick the product name.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: save cloud-config template edits with @rancher/shell 3.0.14
The YamlEditor of shell 3.0.14 no longer emits onChanges, so editing a
template saved its old cloud config. Copy the text from update:value,
which both shell versions emit.
Jest transforms @replit/codemirror-vim-core, an ESM-only dependency of
the new YamlEditor, like the dashboard does.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the YAML editor heights with CodeMirror 6
The min-height rules targeted the CodeMirror 5 element, so the editors
shrank to their text.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: reject IP ranges the network settings don't support
The CIDR check of @rancher/shell 3.0.14 also accepts short forms such as
10.1/16, extra parts and IPv6, so the VM migration, RWX and storage
network settings saved them. Use a strict IPv4 CIDR check of our own.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the look of the file selector buttons
The FileSelector of @rancher/shell 3.0.14 no longer takes button classes
and renders a medium secondary button. Pass the variant and size that
match the previous primary and secondary buttons.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep Enter in a migration wizard field on the same step
The Wizard of @rancher/shell 3.0.14 renders its step headers as submit
buttons, so Enter in a text field clicked the first one and jumped back
to step 1.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: show the created message after a restore, upgrade or upload
Since @rancher/shell 3.0.14, save() no longer shows the message for
resources with a generated name; callers show it with
notifyGeneratedName().
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: fold the logging output buffer with the CodeMirror 6 helpers
The YAML editor of @rancher/shell 3.0.14 is CodeMirror 6, and its
CodeMirror 5 methods are deprecated.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the shell's table views off in standalone
@rancher/shell 3.0.14 turns its table views on for every list in the
standalone UI, as the server has no ui-configurable-tables feature and
the default is on. The table views drop the filters the lists put in the
table header, which also left the Images list empty. Add the feature,
disabled, to the management store in standalone only.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: reject zero-padded octets in IP ranges
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* 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>
* feat: use prime logo when server-flavor is prime
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: expose server-flavor setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
In Harvester v1.9.0, we're moving LHv2 from "Experimental" to "Preview",
so I've added a new preview label to the settings interface. I figure
given Experimental had the "error" color, I should make "Preview" use
the warning color, to make it a bit less alarming :-)
Related-to: https://github.com/harvester/harvester/issues/9960
Signed-off-by: Tim Serong <tserong@suse.com>
Co-authored-by: Volker Theile <vtheile@suse.com>
* deps: update rancher/shell to 3.0.12-rc.7
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: move filter labels/schedule buttons position
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve serial console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat(serial-console): add terminal search toolbar and highlight tuning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: clear searach result after close
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: fine tune serial console
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: VM migration tab not appear when first login
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add access/ volume mode model
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add selected all | clear all actions for selected VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: bugs in VM selection table
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add VMware VDDK image option to VM migration provider
Add an optional VMware VDDK Image field to the Configure Provider step of the VM migration wizard, bound to spec.settings.vddkInitImage when set and left unset when empty. Supports create and edit flows and populates from the existing provider when editing.
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Show an error banner and disable the Create and Start action when the migration plan name matches an existing provider or migration plan name.
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: new design for review page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: customize empty table rows message
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: fixed the table column
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: update header tag and align fixed header actions in review migration step
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: remove unneeded overflow css
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify relatedResources using ownerReferences uid
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix(vm-migration): keep completed VMs green and linkable in failed plans
When a plan fails overall, VMs that already reached 100% were marked with an error: their progress bar turned red while the label still read "Finished Successfully", and the migrated-VM detail link was hidden.
Skip the plan-level failure fallback for VMs at 100% and drop the !planFailed guard from the detail-link condition so successfully migrated VMs stay green and stay navigable.
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve VM migration dashboard mapping labels and VM detail link
- Display Management Network / Ignored labels via i18n in mappings column and review card
- Add clickable external-link icon to migrated VM detail page after successful migration
- Add tooltip to the VM detail external-link icon
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify duration column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow user specify namespace for migrated VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: not pre-select target namespace
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: ignore option
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: hide Virtul machine migration tabs if forklift addon is not enabled
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: rename advanced to configurations
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: fixed column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
* revert: power on background color
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add Host Network tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add Host Network edit page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add node selector tab
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: lint
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add warning message if addon is not enabled or already hasone
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: some wordings in en-us.yaml
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add PodSecurity Standard setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: unneeded change
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: filter by isSystem namespace
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add fallback logic
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: some actions limited for virt-viewer
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on schema collectionMethods
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: conditionally add migrate action to available actions
* fix: update collectionMethods check to use find for case-insensitive matching
* fix: update canEditClusterMembers method to use schema for collectionMethods
* fix: update canCreateImage check to use case-insensitive matching
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add Insecure Skip TLS Verify checkbox
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: set insecureSkipTLSVerify default to false
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: conflict
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded change
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: get the feature flag in data()
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: make data logic simpler
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: put tip in info banner
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add nodeUpgradeOption setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add resume button when node paused
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag in v1.7.0
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add reconnect button in VNC console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: reconnnect logic
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: call reconnnect
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: reboot button in VNC console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: hide the arrow in VNC console
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* Align settings page actionMeun with other pages
Signed-off-by: Andy Lee <andy.lee@suse.com>
* update based on PR feedback
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* Add failed and success banner after image uploaded
Signed-off-by: Andy Lee <andy.lee@suse.com>
* add delete image feature
Signed-off-by: Andy Lee <andy.lee@suse.com>
* add skip checking single-replica detached volumes checkbox
Signed-off-by: Andy Lee <andy.lee@suse.com>
* change delete image flow
Signed-off-by: Andy Lee <andy.lee@suse.com>
* Reuse ConfirmRelatedToRemoveDialog
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>