Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: load logs after build failed

Andras Bacsai34ff6eb567b2
diff --git a/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte b/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte
index bb82ca6a4d..49ffb8258b 100644
--- a/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte
+++ b/apps/ui/src/routes/applications/[id]/logs/_BuildLog.svelte
@@ -61,12 +61,27 @@
fromDb = from;
streamInterval = setInterval(async () => {
+ const nextSequence = logs[logs.length - 1]?.time || 0;
if (status !== 'running' && status !== 'queued') {
loading = false;
+ try {
+ const data = await get(
+ `/applications/${id}/logs/build/${$selectedBuildId}?sequence=${nextSequence}`
+ );
+ status = data.status;
+ currentStatus = status;
+ fromDb = data.fromDb;
+
+ logs = logs.concat(
+ data.logs.map((log: any) => ({ ...log, line: cleanAnsiCodes(log.line) }))
+ );
+ loading = false;
+ } catch (error) {
+ return errorNotification(error);
+ }
clearInterval(streamInterval);
return;
}
- const nextSequence = logs[logs.length - 1]?.time || 0;
try {
const data = await get(
`/applications/${id}/logs/build/${$selectedBuildId}?sequence=${nextSequence}`