1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fetching backend stats

This commit is contained in:
Fedor Katurov 2020-06-09 12:35:54 +07:00
parent d260325592
commit be3401a4e5
5 changed files with 46 additions and 8 deletions

View file

@ -7,9 +7,31 @@ export type IStatGitRow = {
timestamp: string;
};
export type IStatBackend = {
users: {
total: number;
alive: number;
};
nodes: {
images: number;
audios: number;
videos: number;
texts: number;
total: number;
};
comments: {
total: number;
};
files: {
count: number;
size: number;
};
};
export type IBorisState = Readonly<{
stats: {
git: IStatGitRow[];
backend: IStatBackend;
is_loading: boolean;
};
}>;
@ -17,6 +39,7 @@ export type IBorisState = Readonly<{
const BORIS_INITIAL_STATE: IBorisState = {
stats: {
git: [],
backend: null,
is_loading: false,
},
};