mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
[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:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user