From c743c58264eccc53df3147e535967a10511fa681 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 7 Feb 2024 12:26:54 -0500 Subject: [PATCH] Modernize DatasetStorage.vue. --- client/src/api/datasets.ts | 2 + client/src/api/index.ts | 5 + .../Dataset/DatasetStorage/DatasetStorage.vue | 129 ++++++++---------- 3 files changed, 67 insertions(+), 69 deletions(-) diff --git a/client/src/api/datasets.ts b/client/src/api/datasets.ts index 642aa0c03a22..63b8b5714d9c 100644 --- a/client/src/api/datasets.ts +++ b/client/src/api/datasets.ts @@ -38,6 +38,8 @@ export async function getDatasets(options: GetDatasetsOptions = {}) { export const fetchDataset = fetcher.path("/api/datasets/{dataset_id}").method("get").create(); +export const fetchDatasetStorage = fetcher.path("/api/datasets/{dataset_id}/storage").method("get").create(); + export async function fetchDatasetDetails(params: { id: string }): Promise { const { data } = await fetchDataset({ dataset_id: params.id, view: "detailed" }); // We know that the server will return a DatasetDetails object because of the view parameter diff --git a/client/src/api/index.ts b/client/src/api/index.ts index 0003833819fa..83da2479adbc 100644 --- a/client/src/api/index.ts +++ b/client/src/api/index.ts @@ -27,6 +27,11 @@ export type DatasetSummary = components["schemas"]["HDASummary"]; */ export type DatasetDetails = components["schemas"]["HDADetailed"]; +/** + * Contains storage (object store, quota, etc..) details for a dataset. + */ +export type DatasetStorageDetails = components["schemas"]["DatasetStorageDetails"]; + /** * Represents a HistoryDatasetAssociation with either summary or detailed information. */ diff --git a/client/src/components/Dataset/DatasetStorage/DatasetStorage.vue b/client/src/components/Dataset/DatasetStorage/DatasetStorage.vue index 6e8dd47508e7..584f987f7ab1 100644 --- a/client/src/components/Dataset/DatasetStorage/DatasetStorage.vue +++ b/client/src/components/Dataset/DatasetStorage/DatasetStorage.vue @@ -1,3 +1,63 @@ + + - -