diff --git a/client/src/components/Common/FilterObjectStoreLink.vue b/client/src/components/Common/FilterObjectStoreLink.vue index 65860cd057cc..c68aeb6a8011 100644 --- a/client/src/components/Common/FilterObjectStoreLink.vue +++ b/client/src/components/Common/FilterObjectStoreLink.vue @@ -5,6 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { computed, ref } from "vue"; import { ConcreteObjectStoreModel } from "@/api"; +import { useObjectStoreStore } from "@/stores/objectStoreStore"; import ObjectStoreSelect from "./ObjectStoreSelect.vue"; import SelectModal from "@/components/Dataset/DatasetStorage/SelectModal.vue"; @@ -12,26 +13,28 @@ import SelectModal from "@/components/Dataset/DatasetStorage/SelectModal.vue"; library.add(faTimes); interface FilterObjectStoreLinkProps { - value: String | null; + value?: string; objectStores: ConcreteObjectStoreModel[]; } const props = defineProps(); +const { getObjectStoreNameById } = useObjectStoreStore(); + const showModal = ref(false); const emit = defineEmits<{ - (e: "change", objectStoreId: string | null): void; + (e: "change", objectStoreId?: string): void; }>(); -function onSelect(objectStoreId: string | null) { +function onSelect(objectStoreId?: string) { emit("change", objectStoreId); showModal.value = false; } const selectionText = computed(() => { if (props.value) { - return props.value; + return getObjectStoreNameById(props.value); } else { return "(any)"; } @@ -45,7 +48,7 @@ const selectionText = computed(() => { {{ selectionText }} - + diff --git a/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue b/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue index d3ca05932077..ca8b718f4560 100644 --- a/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue +++ b/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue @@ -51,14 +51,14 @@ const { isLoading, loadDataOnMount } = useDataLoading(); const { isAdvanced, toggleAdvanced, inputGroupClasses, faAngleDoubleDown, faAngleDoubleUp } = useAdvancedFiltering(); const { selectableObjectStores, hasSelectableObjectStores } = useSelectableObjectStores(); -const objectStore = ref(null); +const objectStore = ref(); const canEditHistory = computed(() => { const history = getHistoryById(props.historyId); return (history && !history.purged && !history.archived) ?? false; }); -function onChangeObjectStore(value: string | null) { +function onChangeObjectStore(value?: string) { objectStore.value = value; reloadDataFromServer(); } @@ -190,7 +190,7 @@ function onUndelete(datasetId: string) {