[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
@@ -307,6 +307,14 @@ async function getHistoryId(projectId) {
return historyId
}
async function getProjectBlobStats(historyIds) {
return await fetchJson(`${HISTORY_V1_URL}/projects/blob-stats`, {
method: 'POST',
basicAuth: HISTORY_V1_BASIC_AUTH,
json: { projectIds: historyIds.map(id => id.toString()) },
})
}
async function injectUserDetails(data) {
// data can be either:
// {
@@ -418,5 +426,6 @@ module.exports = {
requestBlobWithProjectId,
getLatestHistory,
getChanges,
getProjectBlobStats,
},
}