feat: add disable resource pooling checkbox on pcidevice page (#902)

Signed-off-by: Jack Yu <jack.yu@suse.com>
This commit is contained in:
Jack Yu 2026-06-05 11:18:14 +08:00 committed by GitHub
parent b4ea7c8f98
commit ae65037083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 32 additions and 6 deletions

View File

@ -71,6 +71,7 @@ const FEATURE_FLAGS = {
'v1.8.1': [],
'v1.9.0': [
'supportFilesystem',
'disableResourcePooling',
],
};

View File

@ -1,6 +1,8 @@
<script>
import { mapGetters } from 'vuex';
import { Banner } from '@components/Banner';
import { Card } from '@components/Card';
import { Checkbox } from '@components/Form/Checkbox';
import AsyncButton from '@shell/components/AsyncButton';
import { escapeHtml } from '@shell/utils/string';
import { HCI } from '../types';
@ -13,7 +15,9 @@ export default {
components: {
AsyncButton,
Banner,
Card,
Checkbox,
},
props: {
@ -24,10 +28,16 @@ export default {
},
data() {
return {};
return { disableResourcePooling: false };
},
computed: { ...mapGetters({ t: 'i18n/t' }) },
computed: {
...mapGetters({ t: 'i18n/t' }),
disableResourcePoolingEnabled() {
return this.$store.getters['harvester-common/getFeatureEnabled']('disableResourcePooling');
},
},
methods: {
close() {
@ -54,7 +64,8 @@ export default {
spec: {
address: actionResource.status.address,
nodeName: actionResource.status.nodeName,
userName
userName,
disableResourcePooling: this.disableResourcePooling,
}
} );
@ -85,7 +96,19 @@ export default {
</template>
<template #body>
<p class="mb-20">
{{ t('harvester.pci.enablePassthroughWarning') }}
</p>
<template v-if="disableResourcePoolingEnabled">
<Checkbox
v-model:value="disableResourcePooling"
label-key="harvester.pci.disableResourcePooling"
/>
<Banner
color="info"
:label="t('harvester.pci.disableResourcePoolingDescription')"
/>
</template>
</template>
<template #actions>

View File

@ -409,6 +409,8 @@ harvester:
suffix: to enable the add-on to successfully manage your PCI devices.
noPCIPermission: Please contact your system administrator to enable the PCI devices first.
enablePassthroughWarning: Please be careful not to use host-owned PCI devices (e.g., management and VLAN NICs). Incorrect device allocation may cause damage to your cluster, including node failure.
disableResourcePooling: Disable Resource Pooling
disableResourcePoolingDescription: Assigns this device a unique resource name so it can be pinned to a specific VM, instead of sharing the pool with other identical devices.
devices:
matrixHostName: Host Name