From 26a40aa741bd78f927450df77043e4afb976f611 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 20 Jun 2023 16:35:02 -0400 Subject: [PATCH] fix(ui): Add newlines to copy and paste of logs (#14019) (#14103) (#14144) Signed-off-by: Alex Collins Co-authored-by: Alex Collins --- .../components/pod-logs-viewer/pod-logs-viewer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.tsx b/ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.tsx index 9a126126ef04c..a097d47295afa 100644 --- a/ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.tsx +++ b/ui/src/app/applications/components/pod-logs-viewer/pod-logs-viewer.tsx @@ -210,7 +210,8 @@ export const PodsLogsViewer = (props: PodLogsProps) => { ? (lineNum === 0 || logs[lineNum - 1].timeStamp !== log.timeStamp ? log.timeStampStr : ' '.repeat(log.timeStampStr.length)) + ' ' : '') + // show the log content, highlight the filter text - log.content?.replace(highlight, (substring: string) => whiteOnYellow + substring + reset); + log.content?.replace(highlight, (substring: string) => whiteOnYellow + substring + reset) + + '\n'; // logs are in 14px wide fixed width font let width = 0;