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.8.1': [],
|
||||||
'v1.9.0': [
|
'v1.9.0': [
|
||||||
'supportFilesystem',
|
'supportFilesystem',
|
||||||
|
'disableResourcePooling',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { Banner } from '@components/Banner';
|
||||||
import { Card } from '@components/Card';
|
import { Card } from '@components/Card';
|
||||||
|
import { Checkbox } from '@components/Form/Checkbox';
|
||||||
import AsyncButton from '@shell/components/AsyncButton';
|
import AsyncButton from '@shell/components/AsyncButton';
|
||||||
import { escapeHtml } from '@shell/utils/string';
|
import { escapeHtml } from '@shell/utils/string';
|
||||||
import { HCI } from '../types';
|
import { HCI } from '../types';
|
||||||
@ -13,7 +15,9 @@ export default {
|
|||||||
|
|
||||||
components: {
|
components: {
|
||||||
AsyncButton,
|
AsyncButton,
|
||||||
|
Banner,
|
||||||
Card,
|
Card,
|
||||||
|
Checkbox,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -24,10 +28,16 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
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: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
@ -54,7 +64,8 @@ export default {
|
|||||||
spec: {
|
spec: {
|
||||||
address: actionResource.status.address,
|
address: actionResource.status.address,
|
||||||
nodeName: actionResource.status.nodeName,
|
nodeName: actionResource.status.nodeName,
|
||||||
userName
|
userName,
|
||||||
|
disableResourcePooling: this.disableResourcePooling,
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -85,7 +96,19 @@ export default {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #body>
|
<template #body>
|
||||||
|
<p class="mb-20">
|
||||||
{{ t('harvester.pci.enablePassthroughWarning') }}
|
{{ 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>
|
||||||
|
|
||||||
<template #actions>
|
<template #actions>
|
||||||
|
|||||||
@ -409,6 +409,8 @@ harvester:
|
|||||||
suffix: to enable the add-on to successfully manage your PCI devices.
|
suffix: to enable the add-on to successfully manage your PCI devices.
|
||||||
noPCIPermission: Please contact your system administrator to enable the PCI devices first.
|
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.
|
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:
|
devices:
|
||||||
matrixHostName: Host Name
|
matrixHostName: Host Name
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user