diff --git a/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue b/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue index 246fe4d4455c..ae6a131ae39b 100644 --- a/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue +++ b/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue @@ -4,6 +4,7 @@ import { useRouter } from "vue-router/composables"; import { useConfirmDialog } from "@/composables/confirmDialog"; import { useToast } from "@/composables/toast"; +import { useHistoryStore } from "@/stores/historyStore"; import localize from "@/utils/localization"; import type { DataValuePoint } from "./Charts"; @@ -16,6 +17,7 @@ import SelectedItemActions from "./SelectedItemActions.vue"; import Heading from "@/components/Common/Heading.vue"; import LoadingSpan from "@/components/LoadingSpan.vue"; +const historyStore = useHistoryStore(); const router = useRouter(); const { success: successToast, error: errorToast } = useToast(); const { confirm } = useConfirmDialog(); @@ -98,6 +100,11 @@ function isArchivedDataPoint(dataPoint: DataValuePoint): boolean { return false; } +async function onSetCurrentHistory(historyId: string) { + await historyStore.setCurrentHistory(historyId); + router.push({ path: "/" }); +} + function onViewHistory(historyId: string) { router.push({ name: "HistoryOverview", params: { historyId } }); } @@ -187,6 +194,7 @@ async function onPermanentlyDeleteHistory(historyId: string) {