mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 15:51:00 +00:00
feat(storage): show unreferenced files in Admin > Storage, with the switch and a check
Desktop and phone show what the last check found (can be freed, unused for less than a week, freed), why a category was skipped, the switch that lets the nightly run delete and a report-only check on demand, through the shared storage panel hook. All 28 languages, and the Admin-Storage wiki page explains the check, the week's wait and when to leave it off.
This commit is contained in:
@@ -56,6 +56,8 @@ import {
|
||||
type BookingImportMode,
|
||||
type ReceiptScanResult,
|
||||
type StorageAdminState,
|
||||
type StorageReclaimReport,
|
||||
type StorageReclaimState,
|
||||
type StorageBackend,
|
||||
type StorageConfigPut,
|
||||
type StorageTestResponse,
|
||||
@@ -734,6 +736,12 @@ export const adminApi = {
|
||||
// A full scan of a large install can exceed the 8s instance timeout.
|
||||
refreshStorageStats: (): Promise<StorageUsage> =>
|
||||
apiClient.post('/admin/storage/stats/refresh', undefined, { timeout: 120_000 }).then(r => r.data),
|
||||
setStorageReclaimDelete: (deleteEnabled: boolean): Promise<StorageReclaimState> =>
|
||||
apiClient.put('/admin/storage/reclaim', { deleteEnabled }).then(r => r.data),
|
||||
// A check lists every reclaimable category and asks each domain about it; a
|
||||
// large bucket outlasts the 8s instance timeout. It only reports, whatever the switch says.
|
||||
runStorageReclaimCheck: (): Promise<StorageReclaimReport> =>
|
||||
apiClient.post('/admin/storage/reclaim/run', { reportOnly: true }, { timeout: 300_000 }).then(r => r.data),
|
||||
}
|
||||
|
||||
export const addonsApi = {
|
||||
|
||||
Reference in New Issue
Block a user