mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-11-15 05:16:16 +08:00
feat: align the storage performance options with the Rancher machine pool form (#1212)
* feat: align the storage performance options with the Rancher machine pool form
Show the storage performance profile on every volume instead of behind a
collapsible toggle, and move the VM-wide options to a plain Storage
Performance section in the Advanced Options tab. Put the Native I/O tip in
a live region so screen readers announce the cache mode change, use an
integer input for the I/O thread count, and use the same copy as the
Rancher form.
Skip the view-only backup row in the image and container volumes when it
has nothing to show, so it no longer adds an empty gap above the profile.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: announce the storage performance warnings and name the virtio requirement
- Put the bus tip and the Filesystem warning in an always-rendered status
region. They appear above the field being changed, so screen readers need
them announced.
- Say in the bus tip that a dedicated I/O thread needs the virtio bus, because
KubeVirt rejects it on any other bus.
- Mark I/O Thread Count as required while editing, like the Rancher form.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: state only the dedicated I/O thread requirement in the bus tip
Neither the Harvester docs nor KubeVirt tie cache mode or I/O mode to the bus,
so stop saying that those options work best on virtio.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
(cherry picked from commit 12c28c08fa)
# Conflicts:
# pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/DiskPerformanceOptions.vue
# pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/VMPerformanceOptions.vue
# pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/__tests__/DiskPerformanceOptions.test.ts
# pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/__tests__/VMPerformanceOptions.test.js
This commit is contained in:
@@ -7,7 +7,6 @@ import UnitInput from '@shell/components/form/UnitInput';
|
||||
import { LabeledInput } from '@components/Form/LabeledInput';
|
||||
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
||||
import ModalWithCard from '@shell/components/ModalWithCard';
|
||||
import VMPerformanceOptions from './VMPerformanceOptions';
|
||||
import { VOLUME_HOTPLUG_ACTION, SOURCE_TYPE } from '../../../config/harvester-map';
|
||||
import { PVC, STORAGE_CLASS } from '@shell/config/types';
|
||||
import { clone } from '@shell/utils/object';
|
||||
@@ -24,10 +23,10 @@ import { EMPTY_IMAGE } from '../../../utils/vm';
|
||||
const { READ_WRITE_MANY } = ACCESS_MODE;
|
||||
|
||||
export default {
|
||||
emits: ['update:value', 'update:blockMultiQueue', 'update:ioThreadsPolicy', 'update:ioThreadCount'],
|
||||
emits: ['update:value'],
|
||||
|
||||
components: {
|
||||
Banner, BadgeStateFormatter, VueDraggableNext, InfoBox, LabeledInput, UnitInput, LabeledSelect, ModalWithCard, VMPerformanceOptions
|
||||
Banner, BadgeStateFormatter, VueDraggableNext, InfoBox, LabeledInput, UnitInput, LabeledSelect, ModalWithCard
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -78,22 +77,6 @@ export default {
|
||||
resourceType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
// KubeVirt high-performance VM-level features
|
||||
blockMultiQueue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
ioThreadsPolicy: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
ioThreadCount: {
|
||||
type: Number,
|
||||
default: 2
|
||||
}
|
||||
},
|
||||
|
||||
@@ -164,14 +147,6 @@ export default {
|
||||
isLHV2VolExpansionFeatureEnabled() {
|
||||
return this.$store.getters['harvester-common/getFeatureEnabled']('lhV2VolExpansion');
|
||||
},
|
||||
|
||||
hasVirtioDisk() {
|
||||
return this.rows.some((R) => R.type === 'disk' && R.bus === 'virtio');
|
||||
},
|
||||
|
||||
hasDedicatedIOThread() {
|
||||
return this.rows.some((R) => R.dedicatedIOThread);
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -533,18 +508,6 @@ export default {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<VMPerformanceOptions
|
||||
:block-multi-queue="blockMultiQueue"
|
||||
:io-threads-policy="ioThreadsPolicy"
|
||||
:io-thread-count="ioThreadCount"
|
||||
:has-virtio-disk="hasVirtioDisk"
|
||||
:has-dedicated-iothread="hasDedicatedIOThread"
|
||||
:mode="mode"
|
||||
@update:block-multi-queue="$emit('update:blockMultiQueue', $event)"
|
||||
@update:io-threads-policy="$emit('update:ioThreadsPolicy', $event)"
|
||||
@update:io-thread-count="$emit('update:ioThreadCount', $event)"
|
||||
/>
|
||||
|
||||
<ModalWithCard
|
||||
v-if="isOpen"
|
||||
name="deleteTip"
|
||||
|
||||
Reference in New Issue
Block a user