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

Add copy-to-clipboard action for thread dumps #170

Merged
merged 1 commit into from May 11, 2020

Conversation

AFaust
Copy link
Contributor

@AFaust AFaust commented May 11, 2020

CHECKLIST

We will not consider a PR until the following items are checked off--thank you!

  • There aren't existing pull requests attempting to address the issue mentioned here
  • Submission developed in a feature branch--not master

CONVINCING DESCRIPTION

This PR adds a copy-to-clipboard action to the thread dump tooling to make it easier to take the thread dump and put it into some external thread dump analysis tooling, like the Spotify Thread Dump Analyser

RELATED INFORMATION

This PR does not fix a specific issue, but might be able to help support the use case expressed in #141

area.value = textToWrite;
document.body.appendChild(area);
area.select();
document.execCommand('copy');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this approach work in all modern browsers? Last I checked, this would not work in Chrome.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, did not actually check other browsers apart from Firefox, which I should have done and will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Windows 10 with IE 11.778.18362.0, Firefox 76.0.1, Edge 44, Chrome 81.0.4044.138 - copy to clipboard works in all environments, although IE 11 needs a bit of a fixup with regards to stripping HTML markup out of before copying to clipboard.

@AFaust AFaust force-pushed the threadDump-copyToClipboard branch from 3ee462c to 5d7eb6c Compare May 11, 2020 21:12
@AFaust AFaust force-pushed the threadDump-copyToClipboard branch from 5d7eb6c to b731a08 Compare May 11, 2020 21:14
@AFaust AFaust merged commit 2e9acf7 into OrderOfTheBee:master May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants