From 52c4556e640a413df09f9cb7ab792664271d8315 Mon Sep 17 00:00:00 2001 From: Yiya Chen Date: Wed, 18 Jun 2025 17:17:43 +0800 Subject: [PATCH] fix: failed to clone an image file created by file upload (#339) * fix: filter clone action * fix: hide clone action for other types * feat: show source type in details --------- Signed-off-by: Yi-Ya Chen --- .../harvesterhci.io.virtualmachineimage/index.vue | 14 ++++++++++++++ .../models/harvesterhci.io.virtualmachineimage.js | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/pkg/harvester/detail/harvesterhci.io.virtualmachineimage/index.vue b/pkg/harvester/detail/harvesterhci.io.virtualmachineimage/index.vue index 3c09ca7d..1fda3f7d 100644 --- a/pkg/harvester/detail/harvesterhci.io.virtualmachineimage/index.vue +++ b/pkg/harvester/detail/harvesterhci.io.virtualmachineimage/index.vue @@ -118,6 +118,10 @@ export default { imageName() { return this.value?.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_NAME] || '-'; }, + + sourceType() { + return this.value?.spec?.sourceType; + }, } }; @@ -252,6 +256,16 @@ export default { +
+
+ +
+
+
!toFilter.includes(A.action)); + // show `Clone` only when imageSource is `download` + if (this.imageSource !== 'download') { + out = out.filter(({ action }) => action !== 'goToClone'); + } + const schema = this.$getters['schemaFor'](HCI.VM); let canCreateVM = true;