mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-06-13 13:32:20 +00:00
feat: add disable resource pooling checkbox on pcidevice page (#902)
Signed-off-by: Jack Yu <jack.yu@suse.com>
This commit is contained in:
parent
b4ea7c8f98
commit
ae65037083
@ -71,6 +71,7 @@ const FEATURE_FLAGS = {
|
||||
'v1.8.1': [],
|
||||
'v1.9.0': [
|
||||
'supportFilesystem',
|
||||
'disableResourcePooling',
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user