feat(web): add database overview panel, collection overview and resizable panels; show/hide system databases; use code editor with change-tracking in document view; add getDatabaseStats API and typings; enable overwrite for S3 uploads
This commit is contained in:
@@ -35,6 +35,17 @@ export interface ICollectionStats {
|
||||
indexCount: number;
|
||||
}
|
||||
|
||||
export interface IDatabaseStats {
|
||||
collections: number;
|
||||
views: number;
|
||||
objects: number;
|
||||
avgObjSize: number;
|
||||
dataSize: number;
|
||||
storageSize: number;
|
||||
indexes: number;
|
||||
indexSize: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* API service for communicating with the tsview backend
|
||||
*/
|
||||
@@ -344,4 +355,12 @@ export class ApiService {
|
||||
}> {
|
||||
return this.request('getServerStatus', {});
|
||||
}
|
||||
|
||||
async getDatabaseStats(databaseName: string): Promise<IDatabaseStats | null> {
|
||||
const result = await this.request<
|
||||
{ databaseName: string },
|
||||
{ stats: IDatabaseStats | null }
|
||||
>('getDatabaseStats', { databaseName });
|
||||
return result.stats;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user