[web] display project history blob size on admin pages (#28351)
* [history-v1] add endpoint for getting blob stats of projects * [web] display project history blob size on admin pages * [web] break down history storage size by text and binary blob GitOrigin-RevId: bfa4d56cf2c503d03005c13a0f7ac38158156cd2
This commit is contained in:
@@ -16,6 +16,21 @@ class MockV1HistoryApi extends AbstractMockApi {
|
||||
}
|
||||
|
||||
applyRoutes() {
|
||||
this.app.post('/api/projects/blob-stats', (req, res, next) => {
|
||||
res.json(
|
||||
req.body.projectIds.map(projectId => {
|
||||
return {
|
||||
projectId,
|
||||
textBlobBytes: 7331,
|
||||
binaryBlobBytes: 1337,
|
||||
totalBytes: 7331 + 1337,
|
||||
nTextBlobs: 13,
|
||||
nBinaryBlobs: 42,
|
||||
}
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
this.app.get(
|
||||
'/api/projects/:project_id/version/:version/zip',
|
||||
(req, res, next) => {
|
||||
|
||||
Reference in New Issue
Block a user