Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy/paste from logs UI does not preserve newlines in some editors #14019

Closed
crenshaw-dev opened this issue Jun 13, 2023 · 10 comments · Fixed by #14103
Closed

Copy/paste from logs UI does not preserve newlines in some editors #14019

crenshaw-dev opened this issue Jun 13, 2023 · 10 comments · Fixed by #14103
Assignees
Labels
bug Something isn't working component:ui User interfaces bugs and enhancements

Comments

@crenshaw-dev
Copy link
Collaborator

crenshaw-dev commented Jun 13, 2023

Describe the bug

When I click/drag to select logs in the logs UI, ctrl+c to copy, and then paste into an editor, newlines are gone.

Works for Mac's TextEdit, fails for IntelliJ.

To Reproduce

Do the above.

Expected behavior

Newlines are preserved.

Version

2.7.2

@crenshaw-dev crenshaw-dev added bug Something isn't working component:ui User interfaces bugs and enhancements labels Jun 13, 2023
@alexec
Copy link
Contributor

alexec commented Jun 14, 2023

will you fix this, or do you need me to?

@crenshaw-dev
Copy link
Collaborator Author

I won't fix it any time soon. @ashutosh16 might try in the next month or two.

@alexec
Copy link
Contributor

alexec commented Jun 15, 2023

this is the kind of UI annoyance that really impacts a features usefulness, I will fix

@alexec alexec self-assigned this Jun 15, 2023
@alexec
Copy link
Contributor

alexec commented Jun 16, 2023

Works for me on master:

image

@alexec
Copy link
Contributor

alexec commented Jun 16, 2023

This is a bug in v2.7.2.

2023-06-16T15:14:06+0000 WARN A warning that should be ignored is usually at this level and should be actionable.2023-06-16T15:14:07+0000 WARN A warning that should be ignored is usually at this level and should be actionable.2023-06-16T15:14:08+0000 INFO This is less important than debug log and is often used to provide context in the current task.2023-06-16T15:14:12+0000 INFO This is less important than debug log and is often used to provide context in the current task.2023-06-16T15:14:12+0000 ERROR An error is usually an exception that has been caught and not handled.2023-06-16T15:14:13+0000 INFO This is less important than debug log and is often used to provide context in the current task.2023-06-16T15:14:16+0000 DEBUG This is a debug log that shows a log that can be ignored.

@crenshaw-dev
Copy link
Collaborator Author

@alexec must be a line ending difference. Try pasting into an IntelliJ scratch window instead of TextEdit.

Another bug: "copy logs to clipboard" fails with "Cannot read properties of undefined (reading 'getData')" on first load of the logs window. Self-resolves after a couple minutes.

@alexec
Copy link
Contributor

alexec commented Jun 16, 2023

So it depends where you paste it.

@crenshaw-dev crenshaw-dev changed the title Copy/paste from logs UI does not preserve newlines Copy/paste from logs UI does not preserve newlines in some editors Jun 16, 2023
@alexec
Copy link
Contributor

alexec commented Jun 16, 2023

Just needs a new line:

2023-06-16T15:24:57+0000 DEBUG This is a debug log that shows a log that can be ignored.
2023-06-16T15:25:02+0000 DEBUG This is a debug log that shows a log that can be ignored.
2023-06-16T15:25:07+0000 INFO This is less important than debug log and is often used to provide context in the current task.
2023-06-16T15:25:07+0000 INFO This is less important than debug log and is often used to provide context in the current task.

alexec added a commit to alexec/argo-cd that referenced this issue Jun 16, 2023
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@alexec
Copy link
Contributor

alexec commented Jun 16, 2023

PR created. Pls review.

@alexec alexec closed this as completed in 4ca903b Jun 20, 2023
gcp-cherry-pick-bot bot pushed a commit that referenced this issue Jun 20, 2023
Signed-off-by: Alex Collins <alex_collins@intuit.com>
crenshaw-dev pushed a commit that referenced this issue Jun 20, 2023
…4144)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
schakrad pushed a commit to schakrad/argo-cd that referenced this issue Jul 24, 2023
…oproj#14103) (argoproj#14144)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>
yyzxw pushed a commit to yyzxw/argo-cd that referenced this issue Aug 9, 2023
…goproj#14103)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this issue Dec 16, 2023
…goproj#14103)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:ui User interfaces bugs and enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants