Latest changes from Harvester master - d7d9d4af8a88d677695d7aff47a81d52041dfcca

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-11-12 11:50:17 +01:00
parent d04cd35a08
commit dc74441d26
46 changed files with 1290 additions and 1624 deletions
@@ -6,6 +6,8 @@ import { Banner } from '@components/Banner';
import HarvesterDisk from '../../mixins/harvester-disk';
import { RadioGroup } from '@components/Form/Radio';
import { LONGHORN_VERSION_V1 } from '@shell/config/types';
export default {
emits: ['update:value'],
@@ -86,6 +88,20 @@ export default {
return '';
}
},
provisioner() {
let labelKey = `harvester.host.disk.storage.longhorn.${ LONGHORN_VERSION_V1 }.label`;
if (this.value?.blockDevice?.spec?.provisioner.longhorn) {
labelKey = `harvester.host.disk.storage.longhorn.${ this.value.blockDevice.spec.provisioner.longhorn.engineVersion }.label`;
}
if (this.value?.blockDevice?.spec?.provisioner.lvm) {
labelKey = 'harvester.host.disk.storage.lvm.label';
}
return this.t(labelKey);
},
},
methods: {
update() {
@@ -198,12 +214,18 @@ export default {
:value="value.displayName"
/>
</div>
<div class="col span-4">
<div v-if="value.path" class="col span-4">
<LabelValue
:name="t('harvester.host.disk.path.label')"
:value="value.path"
/>
</div>
<div class="col span-4">
<LabelValue
:name="t('harvester.host.disk.provisioner')"
:value="provisioner"
/>
</div>
</div>
</div>
</template>
@@ -103,11 +103,10 @@ export default {
const blockDevices = this.$store.getters[`${ inStore }/all`](HCI.BLOCK_DEVICE);
const provisionedBlockDevices = blockDevices.filter((d) => {
const provisioned = d?.spec?.fileSystem?.provisioned;
const isCurrentNode = d?.spec?.nodeName === this.value.id;
const isLonghornMounted = findBy(this.longhornDisks, 'name', d.metadata.name);
return provisioned && isCurrentNode && !isLonghornMounted;
return d?.isProvisioned && isCurrentNode && !isLonghornMounted;
})
.map((d) => {
return {