mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-15 05:16:16 +08:00
* fix: show quotes in high-performance storage hints and keep Custom profile
The Native I/O and I/O threads policy hints were passed to Banner as
:label="t(...)". t() escapes HTML and Banner escapes the label again,
so the quotes showed up as ". Use label-key instead, which renders
the string once.
Picking the Custom performance profile and then choosing options that
match the Default or High Performance preset flipped the selector back
to that preset. Keep an explicit Custom choice and only infer the
profile from the disk values otherwise.
Related: harvester/harvester#11550
* fix: only keep Custom profile when the user picked it
syncProfile() skipped re-detection whenever the profile was Custom,
including a Custom that was inferred from the disk values. In an
existing-volume row, switching from a volume with a WriteBack override
to one with High Performance values left the selector on Custom.
Track the user's explicit Custom choice in its own flag and use that
in the guard, so an inferred Custom still follows the disk values.
Related: harvester/harvester#11550
* test: cover the label-key hints of VMPerformanceOptions
Check that the I/O threads policy and no virtio disk hints are passed to Banner as label keys, so their quotes are not escaped twice, and that the I/O threads policy hint is hidden once a policy is set.
---------
(cherry picked from commit 840f9de73e)
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Alejandro Bonilla <abonilla@suse.com>