diff --git a/migrateDB.ts b/migrateDB.ts index b5924f9..aaab23f 100644 --- a/migrateDB.ts +++ b/migrateDB.ts @@ -164,18 +164,21 @@ async function connect(db) { console.error(`Repository ${r.fullName} is not found (renamed)`); } } - let size = 0; + let size = { storage: 0, file: 0 }; function recursiveCount(files) { - let total = 0; + const out = { storage: 0, file: 0 }; for (const name in files) { const file = files[name]; if (file.size && file.sha && parseInt(file.size) == file.size) { - total += file.size as number; + out.storage += file.size as number; + out.file++; } else if (typeof file == "object") { - total += recursiveCount(file); + const r = recursiveCount(file); + out.storage += r.storage; + out.file += r.file; } } - return total; + return out; } if (r.originalFiles) { diff --git a/public/i18n/locale-en.json b/public/i18n/locale-en.json index a84e234..9bf6769 100644 --- a/public/i18n/locale-en.json +++ b/public/i18n/locale-en.json @@ -9,6 +9,7 @@ "repoId_already_used": "The repository id is already used.", "invalid_repoId": "The format of the repository id is invalid.", "branch_not_specified": "The branch is not specified.", + "branch_not_found": "The branch of the repository cannot be found.", "options_not_provided": "Anonymization options are mandatory.", "invalid_terms_format": "Terms are in an invalid format.", "unable_to_anonymize": "An error happened during the anonymization process. Please try later or report the issue.", diff --git a/public/partials/dashboard.htm b/public/partials/dashboard.htm index fd901c2..638eafe 100644 --- a/public/partials/dashboard.htm +++ b/public/partials/dashboard.htm @@ -152,6 +152,67 @@ + +