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 <yiya.chen@suse.com>
This commit is contained in:
Yiya Chen 2025-06-18 17:17:43 +08:00 committed by GitHub
parent 90cb147938
commit 52c4556e64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 0 deletions

View File

@ -118,6 +118,10 @@ export default {
imageName() {
return this.value?.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_NAME] || '-';
},
sourceType() {
return this.value?.spec?.sourceType;
},
}
};
</script>
@ -252,6 +256,16 @@ export default {
</div>
</div>
<div class="row">
<div class="col span-12">
<LabelValue
:name="t('harvester.image.source')"
:value="sourceType"
class="mb-20"
/>
</div>
</div>
<div
v-if="errorMessage !== '-'"
class="row"

View File

@ -43,6 +43,11 @@ export default class HciVmImage extends HarvesterResource {
out = out.filter( (A) => !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;