mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
Adding statistics page for Archives.
This commit is contained in:
parent
ad59d67171
commit
2c8f765f2b
7 changed files with 224 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue