refactor: Update Woodpecker CI config and StorageHierarchy component
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
6400eb9513
commit
e70c9d48fb
2 changed files with 47 additions and 33 deletions
|
@ -7,7 +7,7 @@
|
|||
<v-select
|
||||
v-model="selectedStorageId"
|
||||
:items="storageSpaces"
|
||||
item-title="location"
|
||||
item-title="name"
|
||||
item-value="id"
|
||||
label="Select Storage Space"
|
||||
density="compact"
|
||||
|
@ -16,7 +16,7 @@
|
|||
style="max-width: 300px"
|
||||
></v-select>
|
||||
</v-card-title>
|
||||
|
||||
|
||||
<v-card-text>
|
||||
<v-alert
|
||||
v-if="error"
|
||||
|
@ -26,20 +26,20 @@
|
|||
>
|
||||
{{ error }}
|
||||
</v-alert>
|
||||
|
||||
|
||||
<div v-if="loading" class="d-flex justify-center align-center my-4">
|
||||
<v-progress-circular indeterminate color="primary"></v-progress-circular>
|
||||
</div>
|
||||
|
||||
|
||||
<template v-else>
|
||||
<v-expansion-panels v-if="selectedStorage">
|
||||
<storage-box
|
||||
:storage="selectedStorage"
|
||||
<storage-box
|
||||
:storage="selectedStorage"
|
||||
:objects="objectsInStorage"
|
||||
:nested-storages="nestedStorages"
|
||||
/>
|
||||
</v-expansion-panels>
|
||||
|
||||
|
||||
<v-alert v-else type="info" variant="tonal">
|
||||
Please select a storage space to view its contents
|
||||
</v-alert>
|
||||
|
@ -92,13 +92,13 @@ const StorageBox = defineComponent({
|
|||
const objectsInCurrentStorage = computed(() => {
|
||||
return props.objects.filter(obj => obj.storagespaceId === props.storage.id);
|
||||
});
|
||||
|
||||
|
||||
const childStorages = computed(() => {
|
||||
return props.nestedStorages.filter(storage =>
|
||||
return props.nestedStorages.filter(storage =>
|
||||
storage.parent && storage.parent.valid && storage.parent.int64 === props.storage.id
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
return { objectsInCurrentStorage, childStorages };
|
||||
},
|
||||
template: `
|
||||
|
@ -136,7 +136,7 @@ const StorageBox = defineComponent({
|
|||
No objects in this storage
|
||||
</v-alert>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-if="childStorages.length > 0" class="mt-4">
|
||||
<h3 class="text-subtitle-1 mb-2">Nested storage spaces:</h3>
|
||||
<v-expansion-panels>
|
||||
|
@ -186,7 +186,7 @@ watch(selectedStorageId, async (newId) => {
|
|||
async function fetchStorageData(storageId: number): Promise<void> {
|
||||
loading.value = true;
|
||||
error.value = null;
|
||||
|
||||
|
||||
try {
|
||||
await storageStore.fetchStorageHierarchy(storageId);
|
||||
} catch (err: any) {
|
||||
|
@ -207,7 +207,7 @@ watch(() => storageStore.storageSpaces, (newSpaces) => {
|
|||
onMounted(async () => {
|
||||
loading.value = true;
|
||||
error.value = null;
|
||||
|
||||
|
||||
try {
|
||||
await storageStore.fetchStorageSpaces();
|
||||
if (storageSpaces.value.length > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue