From 1c07b630be885c431cf35bbcd07139821c7f2fc7 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 19 Feb 2024 12:07:23 -0500 Subject: [PATCH 1/7] OverviewPage component for re-use. --- .../HistoriesStorageOverview.vue | 8 +++----- .../Visualizations/HistoryStorageOverview.vue | 19 ++++++++----------- .../DiskUsage/Visualizations/OverviewPage.vue | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 client/src/components/User/DiskUsage/Visualizations/OverviewPage.vue diff --git a/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue b/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue index ae6a131ae39b..9d63b587c5e0 100644 --- a/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue +++ b/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue @@ -12,9 +12,9 @@ import { bytesLabelFormatter, bytesValueFormatter } from "./Charts/formatters"; import { fetchAllHistoriesSizeSummary, type ItemSizeSummary, purgeHistoryById, undeleteHistoryById } from "./service"; import BarChart from "./Charts/BarChart.vue"; +import OverviewPage from "./OverviewPage.vue"; import RecoverableItemSizeTooltip from "./RecoverableItemSizeTooltip.vue"; import SelectedItemActions from "./SelectedItemActions.vue"; -import Heading from "@/components/Common/Heading.vue"; import LoadingSpan from "@/components/LoadingSpan.vue"; const historyStore = useHistoryStore(); @@ -151,9 +151,7 @@ async function onPermanentlyDeleteHistory(historyId: string) { } - + diff --git a/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue b/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue index 42129841b95b..f6bf8c8434db 100644 --- a/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue +++ b/client/src/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue @@ -17,9 +17,9 @@ import { } from "./service"; import BarChart from "./Charts/BarChart.vue"; +import OverviewPage from "./OverviewPage.vue"; import RecoverableItemSizeTooltip from "./RecoverableItemSizeTooltip.vue"; import SelectedItemActions from "./SelectedItemActions.vue"; -import Heading from "@/components/Common/Heading.vue"; import LoadingSpan from "@/components/LoadingSpan.vue"; const router = useRouter(); @@ -27,12 +27,11 @@ const { success: successToast, error: errorToast } = useToast(); const { confirm } = useConfirmDialog(); const { getHistoryNameById } = useHistoryStore(); -const props = defineProps({ - historyId: { - type: String, - required: true, - }, -}); +interface Props { + historyId: string; +} + +const props = defineProps(); const datasetsSizeSummaryMap = new Map(); const topTenDatasetsBySizeData = ref(null); @@ -149,9 +148,7 @@ async function onPermanentlyDeleteDataset(datasetId: string) { } diff --git a/client/src/components/User/DiskUsage/Visualizations/OverviewPage.vue b/client/src/components/User/DiskUsage/Visualizations/OverviewPage.vue new file mode 100644 index 000000000000..932742f5bafd --- /dev/null +++ b/client/src/components/User/DiskUsage/Visualizations/OverviewPage.vue @@ -0,0 +1,19 @@ + + + From 77ef4a3896e045a05cdae5009cc24553ceef3cc7 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 19 Feb 2024 13:40:39 -0500 Subject: [PATCH 2/7] objectstores storage management (UI+API) --- client/src/api/datasets.ts | 18 +-- client/src/api/users.ts | 1 + .../User/DiskUsage/StorageDashboard.vue | 35 ++++- .../HistoriesStorageOverview.vue | 26 ++-- .../Visualizations/HistoryStorageOverview.vue | 135 +++++------------- .../Visualizations/ObjectStoreActions.vue | 48 +++++++ .../ObjectStoreStorageOverview.vue | 123 ++++++++++++++++ .../ObjectStoresStorageOverview.vue | 71 +++++++++ .../Visualizations/ShowObjectStore.vue | 50 +++++++ .../Visualizations/WarnDeletedDatasets.vue | 9 ++ .../Visualizations/WarnDeletedHistories.vue | 9 ++ .../User/DiskUsage/Visualizations/service.ts | 19 ++- .../User/DiskUsage/Visualizations/util.ts | 119 +++++++++++++++ .../analysis/routes/storageDashboardRoutes.ts | 14 ++ lib/galaxy/model/__init__.py | 39 +++++ .../webapps/galaxy/api/history_contents.py | 56 ++++++++ lib/galaxy/webapps/galaxy/api/users.py | 16 +++ .../galaxy/services/history_contents.py | 6 +- test/unit/data/test_quota.py | 14 ++ 19 files changed, 671 insertions(+), 137 deletions(-) create mode 100644 client/src/components/User/DiskUsage/Visualizations/ObjectStoreActions.vue create mode 100644 client/src/components/User/DiskUsage/Visualizations/ObjectStoreStorageOverview.vue create mode 100644 client/src/components/User/DiskUsage/Visualizations/ObjectStoresStorageOverview.vue create mode 100644 client/src/components/User/DiskUsage/Visualizations/ShowObjectStore.vue create mode 100644 client/src/components/User/DiskUsage/Visualizations/WarnDeletedDatasets.vue create mode 100644 client/src/components/User/DiskUsage/Visualizations/WarnDeletedHistories.vue create mode 100644 client/src/components/User/DiskUsage/Visualizations/util.ts diff --git a/client/src/api/datasets.ts b/client/src/api/datasets.ts index 47ee27b2b6a7..120555901521 100644 --- a/client/src/api/datasets.ts +++ b/client/src/api/datasets.ts @@ -49,25 +49,21 @@ export async function fetchDatasetDetails(params: { id: string }): Promise diff --git a/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue b/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue index 9d63b587c5e0..770c274e4740 100644 --- a/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue +++ b/client/src/components/User/DiskUsage/Visualizations/HistoriesStorageOverview.vue @@ -1,5 +1,5 @@