diff --git a/dashboard/src/components/app/Storage.vue b/dashboard/src/components/app/Storage.vue index 2650cbc56..eff395fb4 100644 --- a/dashboard/src/components/app/Storage.vue +++ b/dashboard/src/components/app/Storage.vue @@ -13,6 +13,7 @@ const volumesModel = VolumesModel.create(); const DEFAULT_VOLUME_ID = '__default__'; +const appDataVolumes = ref([]); const volumes = ref([]); const moveBusy = ref(false); const moveError = ref(''); @@ -22,7 +23,7 @@ const volumeId = ref(''); const volumePrefix = ref(''); const originalVolumeId = ref(''); const selectedMountType = computed(() => { - const v = volumes.value.find(v => v.id === volumeId.value); + const v = appDataVolumes.value.find(v => v.id === volumeId.value); return v ? v.mountType : ''; }); @@ -123,7 +124,7 @@ onMounted(async () => { // make a copy, cannot clone due to Proxy objects originalMounts.value = mounts.value.map(m => { return { volumeId: m.volumeId, readOnly: m.readOnly }; }); - volumes.value = [{ + appDataVolumes.value = [{ id: DEFAULT_VOLUME_ID, label: 'Default - /home/yellowtent/appsdata/', mountType: '', @@ -135,6 +136,14 @@ onMounted(async () => { }; })); + volumes.value = result.map(v => { + return { + id: v.id, + label: 'Volume - ' + v.name, + mountType: v.mountType, + }; + }); + volumeId.value = props.app.storageVolumeId || DEFAULT_VOLUME_ID; volumePrefix.value = props.app.storageVolumePrefix || ''; originalVolumeId.value = volumeId.value; @@ -155,7 +164,7 @@ onMounted(async () => { - +