mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
Add USB devices page skeleton
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
@@ -119,12 +119,13 @@ export default {
|
||||
|
||||
const hasPCISchema = !!this.$store.getters[`${ inStore }/schemaFor`](HCI.PCI_DEVICE);
|
||||
const hasSRIOVGPUSchema = !!this.$store.getters[`${ inStore }/schemaFor`](HCI.SR_IOVGPU_DEVICE);
|
||||
const hasUSBSchema = !!this.$store.getters[`${ inStore }/schemaFor`](HCI.USB_DEVICE);
|
||||
|
||||
const hasPCIAddon = res.addons.find(addon => addon.name === ADD_ONS.PCI_DEVICE_CONTROLLER)?.spec?.enabled === true;
|
||||
const hasSriovgpuAddon = res.addons.find(addon => addon.name === ADD_ONS.NVIDIA_DRIVER_TOOLKIT_CONTROLLER)?.spec?.enabled === true;
|
||||
const enabledAddons = res.addons.reduce((acc, addon) => ({ ...acc, [addon.name]: addon.spec?.enabled }), {});
|
||||
|
||||
this.enabledPCI = hasPCIAddon && hasPCISchema;
|
||||
this.enabledSriovgpu = hasSriovgpuAddon && hasPCIAddon && hasSRIOVGPUSchema;
|
||||
this.enabledPCI = hasPCISchema && enabledAddons[ADD_ONS.PCI_DEVICE_CONTROLLER];
|
||||
this.enabledSriovgpu = hasSRIOVGPUSchema && enabledAddons[ADD_ONS.PCI_DEVICE_CONTROLLER] && enabledAddons[ADD_ONS.NVIDIA_DRIVER_TOOLKIT_CONTROLLER];
|
||||
this.enabledUSB = hasUSBSchema && enabledAddons[ADD_ONS.USB_DEVICE_CONTROLLER];
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -165,6 +166,7 @@ export default {
|
||||
saveNetworkDataAsClearText: false,
|
||||
enabledPCI: false,
|
||||
enabledSriovgpu: false,
|
||||
enabledUSB: false,
|
||||
immutableMode: this.realMode === _CREATE ? _CREATE : _VIEW,
|
||||
terminationGracePeriodSeconds: '',
|
||||
cpuPinning: false,
|
||||
|
||||
Reference in New Issue
Block a user