mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
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:
parent
90cb147938
commit
52c4556e64
@ -118,6 +118,10 @@ export default {
|
|||||||
imageName() {
|
imageName() {
|
||||||
return this.value?.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_NAME] || '-';
|
return this.value?.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_NAME] || '-';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sourceType() {
|
||||||
|
return this.value?.spec?.sourceType;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -252,6 +256,16 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col span-12">
|
||||||
|
<LabelValue
|
||||||
|
:name="t('harvester.image.source')"
|
||||||
|
:value="sourceType"
|
||||||
|
class="mb-20"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="errorMessage !== '-'"
|
v-if="errorMessage !== '-'"
|
||||||
class="row"
|
class="row"
|
||||||
|
|||||||
@ -43,6 +43,11 @@ export default class HciVmImage extends HarvesterResource {
|
|||||||
|
|
||||||
out = out.filter( (A) => !toFilter.includes(A.action));
|
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);
|
const schema = this.$getters['schemaFor'](HCI.VM);
|
||||||
let canCreateVM = true;
|
let canCreateVM = true;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user