diff --git a/pkg/harvester/edit/harvesterhci.io.host/index.vue b/pkg/harvester/edit/harvesterhci.io.host/index.vue index 4fd44bec..709e7f39 100644 --- a/pkg/harvester/edit/harvesterhci.io.host/index.vue +++ b/pkg/harvester/edit/harvesterhci.io.host/index.vue @@ -468,10 +468,15 @@ export default { const size = formatSi(sizeBytes, { increment: 1024, suffix: UNIT_SUFFIX }); const parentDevice = d.status?.deviceStatus?.parentDevice; const isChildAdded = this.newDisks.find((newDisk) => newDisk.blockDevice?.status?.deviceStatus?.parentDevice === devPath); + const mountPoint = d.status?.deviceStatus?.fileSystem?.mountPoint; const name = d.displayName; let label = `${ name } (Type: ${ deviceType }, Size: ${ size })`; + if (mountPoint) { + label = `${ label } - ${ this.t('harvester.host.disk.mounted') }`; + } + if (parentDevice) { label = `- ${ label }`; } @@ -481,7 +486,7 @@ export default { value: d.id, action: this.addDisk, kind: !parentDevice ? 'group' : '', - disabled: !!isChildAdded, + disabled: !!isChildAdded || !!mountPoint, group: parentDevice || devPath, isParent: !!parentDevice, }; diff --git a/pkg/harvester/l10n/en-us.yaml b/pkg/harvester/l10n/en-us.yaml index ace78c48..84f50bb6 100644 --- a/pkg/harvester/l10n/en-us.yaml +++ b/pkg/harvester/l10n/en-us.yaml @@ -640,6 +640,7 @@ harvester: notification: success: 'Update host "{name}" storage configurations successfully.' error: Host has unready or unschedulable disks. + mounted: Already Mounted fileSystem: info: Current file system is {system}, You can format it manually. formatting: Disk is formatting, please wait. diff --git a/pkg/harvester/list/devices.harvesterhci.io.usbdevice.vue b/pkg/harvester/list/devices.harvesterhci.io.usbdevice.vue index 6a1ce306..3da3eff9 100644 --- a/pkg/harvester/list/devices.harvesterhci.io.usbdevice.vue +++ b/pkg/harvester/list/devices.harvesterhci.io.usbdevice.vue @@ -53,7 +53,6 @@ export default { devices() { const inStore = this.$store.getters['currentProduct'].inStore; - const data = this.$store.getters[`${ inStore }/all`](HCI.USB_DEVICE) || []; data.forEach((row) => {