From 5661d32ffb4490000853301e3334e6ed1b7d5373 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 21 Jun 2024 08:26:02 +0200 Subject: [PATCH 1/3] Fix newlines in logs --- web/src/components/repo/pipeline/PipelineLog.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/repo/pipeline/PipelineLog.vue b/web/src/components/repo/pipeline/PipelineLog.vue index 6fa42fc79bf..1503348534c 100644 --- a/web/src/components/repo/pipeline/PipelineLog.vue +++ b/web/src/components/repo/pipeline/PipelineLog.vue @@ -184,7 +184,7 @@ function writeLog(line: Partial) { logBuffer.value.push({ index: line.index ?? 0, number: (line.index ?? 0) + 1, - text: ansiUp.value.ansi_to_html(decode(line.text ?? '')), + text: ansiUp.value.ansi_to_html(decode(line.text ?? '') + '\n'), time: line.time ?? 0, type: null, // TODO: implement way to detect errors and warnings }); @@ -254,7 +254,7 @@ async function download() { downloadInProgress.value = false; } const fileURL = window.URL.createObjectURL( - new Blob([logs.map((line) => decode(line.data)).join('')], { + new Blob([logs.map((line) => decode(line.data ?? '')).join('\n')], { type: 'text/plain', }), ); From b1b04edfce42c928054a327d3630c7cf8e2372d9 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 21 Jun 2024 09:12:00 +0200 Subject: [PATCH 2/3] lint --- web/src/components/repo/pipeline/PipelineLog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/repo/pipeline/PipelineLog.vue b/web/src/components/repo/pipeline/PipelineLog.vue index 1503348534c..fe8e07e92e8 100644 --- a/web/src/components/repo/pipeline/PipelineLog.vue +++ b/web/src/components/repo/pipeline/PipelineLog.vue @@ -184,7 +184,7 @@ function writeLog(line: Partial) { logBuffer.value.push({ index: line.index ?? 0, number: (line.index ?? 0) + 1, - text: ansiUp.value.ansi_to_html(decode(line.text ?? '') + '\n'), + text: ansiUp.value.ansi_to_html(`${decode(line.text ?? '') }\n`), time: line.time ?? 0, type: null, // TODO: implement way to detect errors and warnings }); From eab6a8dac2ad3f4a7b65152b180044e940f611a4 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 21 Jun 2024 09:16:57 +0200 Subject: [PATCH 3/3] format --- web/src/components/repo/pipeline/PipelineLog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/repo/pipeline/PipelineLog.vue b/web/src/components/repo/pipeline/PipelineLog.vue index fe8e07e92e8..4636f2f484c 100644 --- a/web/src/components/repo/pipeline/PipelineLog.vue +++ b/web/src/components/repo/pipeline/PipelineLog.vue @@ -184,7 +184,7 @@ function writeLog(line: Partial) { logBuffer.value.push({ index: line.index ?? 0, number: (line.index ?? 0) + 1, - text: ansiUp.value.ansi_to_html(`${decode(line.text ?? '') }\n`), + text: ansiUp.value.ansi_to_html(`${decode(line.text ?? '')}\n`), time: line.time ?? 0, type: null, // TODO: implement way to detect errors and warnings });