[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:
Jakob Ackermann
2025-09-10 08:06:19 +00:00
committed by Copybot
parent 452d77cabc
commit f8d69d05af
9 changed files with 294 additions and 0 deletions
@@ -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) => {