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:
parent
d260325592
commit
be3401a4e5
5 changed files with 46 additions and 8 deletions
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue