mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 17:36:18 -05:00
Creating File Statistics page.
This commit is contained in:
parent
fef8e123a0
commit
e24990aae2
7 changed files with 165 additions and 2 deletions
|
|
@ -661,3 +661,18 @@ export async function getAPIStatus() {
|
|||
let response = await apiGet(`${API_URI}/echo`);
|
||||
return response.status === 200;
|
||||
}
|
||||
|
||||
export async function getFileStatistics() {
|
||||
let response = await apiGet(`${API_URI}/files/statistics`);
|
||||
if (response.status === 200) {
|
||||
const contents = await response.json();
|
||||
return contents['statistics'];
|
||||
} else {
|
||||
toast({
|
||||
type: 'error',
|
||||
title: 'Error!',
|
||||
description: 'Unable to get file statistics',
|
||||
time: 5000,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue