KI-AGENT: Statusanzeige für Tenant-Import ergänzen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 45s
Build and Push Docker Images / build-frontend (push) Successful in 1m21s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 21s
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 45s
Build and Push Docker Images / build-frontend (push) Successful in 1m21s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 21s
This commit is contained in:
@@ -565,16 +565,21 @@ const readZipTextEntry = async (entriesByName: Map<string, any>, name: string) =
|
||||
const restoreArchiveFiles = async (
|
||||
entriesByName: Map<string, any>,
|
||||
exportData: TenantFullExport,
|
||||
manifest: TenantArchiveManifest
|
||||
manifest: TenantArchiveManifest,
|
||||
onProgress?: (progress: { done: number; total: number; message?: string }) => Promise<void> | void
|
||||
) => {
|
||||
let restored = 0
|
||||
let skipped = 0
|
||||
const filesByPath = new Map((manifest.files || []).map((file) => [file.path, file]))
|
||||
const filesTotal = exportData.files?.length || 0
|
||||
let filesDone = 0
|
||||
|
||||
for (const fileRow of exportData.files || []) {
|
||||
const originalPath = fileRow.path
|
||||
if (!originalPath) {
|
||||
skipped += 1
|
||||
filesDone += 1
|
||||
await onProgress?.({ done: filesDone, total: filesTotal, message: "Archivdateien werden wiederhergestellt" })
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -582,12 +587,16 @@ const restoreArchiveFiles = async (
|
||||
const archivePath = manifestFile?.archivePath
|
||||
if (!archivePath || manifestFile?.missing) {
|
||||
skipped += 1
|
||||
filesDone += 1
|
||||
await onProgress?.({ done: filesDone, total: filesTotal, message: "Archivdateien werden wiederhergestellt" })
|
||||
continue
|
||||
}
|
||||
|
||||
const entry = entriesByName.get(archivePath)
|
||||
if (!entry) {
|
||||
skipped += 1
|
||||
filesDone += 1
|
||||
await onProgress?.({ done: filesDone, total: filesTotal, message: "Archivdateien werden wiederhergestellt" })
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -600,6 +609,8 @@ const restoreArchiveFiles = async (
|
||||
ContentLength: content.length,
|
||||
}))
|
||||
restored += 1
|
||||
filesDone += 1
|
||||
await onProgress?.({ done: filesDone, total: filesTotal, message: "Archivdateien werden wiederhergestellt" })
|
||||
}
|
||||
|
||||
return { restored, skipped }
|
||||
@@ -1008,8 +1019,8 @@ export const importTenantFullExportArchive = async (
|
||||
})),
|
||||
}
|
||||
|
||||
const result = await importTenantFullExport(server, rawExportData)
|
||||
const files = await restoreArchiveFiles(entriesByName, rawExportData, manifest)
|
||||
const result = await importTenantFullExport(server, rawExportData, options)
|
||||
const files = await restoreArchiveFiles(entriesByName, rawExportData, manifest, options.onProgress)
|
||||
|
||||
return {
|
||||
...result,
|
||||
|
||||
Reference in New Issue
Block a user