mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 05:06:05 +08:00
feat: support filesystem volume in create VM page (#910)
* feat: add filesystem tab Signed-off-by: Andy Lee <andy.lee@suse.com> * feat: add filesystem tab in create VM page Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: update some wordings Signed-off-by: Andy Lee <andy.lee@suse.com> * feat: add support for filesystem feature flag and enable filesystem tab Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: remove unneeded wordings Signed-off-by: Andy Lee <andy.lee@suse.com> * feat: add support for filesystem feature flag and update icon button positioning Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: based on copilot review Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: remove wrong feature flag Signed-off-by: Andy Lee <andy.lee@suse.com> * fix: vm template Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
@@ -26,6 +26,7 @@ import CpuMemory from './kubevirt.io.virtualmachine/VirtualMachineCpuMemory';
|
||||
import CpuModel from './kubevirt.io.virtualmachine/VirtualMachineCpuModel';
|
||||
import CloudConfig from './kubevirt.io.virtualmachine/VirtualMachineCloudConfig';
|
||||
import SSHKey from './kubevirt.io.virtualmachine/VirtualMachineSSHKey';
|
||||
import Filesystem from './kubevirt.io.virtualmachine/VirtualMachineFilesystem';
|
||||
|
||||
export default {
|
||||
name: 'HarvesterEditVMTemplate',
|
||||
@@ -51,6 +52,7 @@ export default {
|
||||
UnitInput,
|
||||
Banner,
|
||||
KeyValue,
|
||||
Filesystem,
|
||||
},
|
||||
|
||||
mixins: [CreateEditView, VM_MIXIN],
|
||||
@@ -95,6 +97,10 @@ export default {
|
||||
secretNamePrefix() {
|
||||
return this.templateValue?.metadata?.name;
|
||||
},
|
||||
|
||||
filesystemEnabled() {
|
||||
return this.$store.getters['harvester-common/getFeatureEnabled']('supportFilesystem');
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -154,6 +160,7 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.imageId = this.diskRows[0]?.image || '';
|
||||
this['filesystemRows'] = this.getFilesystemRows(this.value.spec.vm);
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -349,6 +356,19 @@ export default {
|
||||
</template>
|
||||
</Tab>
|
||||
|
||||
<Tab
|
||||
v-if="filesystemEnabled"
|
||||
name="filesystem"
|
||||
:label="t('harvester.tab.filesystem')"
|
||||
:weight="-8"
|
||||
>
|
||||
<Filesystem
|
||||
v-model:value="filesystemRows"
|
||||
:mode="mode"
|
||||
:namespace="templateValue.metadata.namespace"
|
||||
/>
|
||||
</Tab>
|
||||
|
||||
<Tab
|
||||
name="labels"
|
||||
:label="t('generic.labels')"
|
||||
|
||||
Reference in New Issue
Block a user