Adding statistics page for Archives.

This commit is contained in:
Roland 2026-02-02 15:15:28 -07:00
parent ad59d67171
commit 2c8f765f2b
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
7 changed files with 224 additions and 2 deletions

View file

@ -451,6 +451,22 @@ export async function fetchArchiveBrowsers() {
return {browsers: [], available: false};
}
export async function getArchiveStatistics() {
const response = await apiGet(`${ARCHIVES_API}/statistics`);
if (response.status === 200) {
return (await response.json())['statistics'];
} else {
const message = await getErrorMessage(response, 'Could not get archive statistics.');
toast({
type: 'error',
title: 'Getting Archive Statistics Failed',
description: message,
time: 5000,
});
}
return response
}
export async function fetchBrowserProfiles() {
const response = await apiGet(`${API_URI}/videos/browser-profiles`);
if (response.status === 200) {