-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
WIP: #190 JSON export #236
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We need to move buttons to JSONViewer component.
- Use standard bulma buttons
kafka-ui-react-app/src/components/Topics/Details/Messages/MessageItem.tsx
Outdated
Show resolved
Hide resolved
I have no idea how to test the file download yet. Still working on it. |
Okay, after some research I've got an impression that the file-downloading part of the functionality is pretty much untestable. I didn't find a way to trigger the file download inside of the testing environment. |
@GneyHabub Does it throw any errors when are you trying to test it? I think we can split view and download logic and test them separately:
|
kafka-ui-react-app/src/components/Topics/Details/Messages/MessageItem.tsx
Outdated
Show resolved
Hide resolved
kafka-ui-react-app/src/components/common/JSONViewer/JSONViewer.tsx
Outdated
Show resolved
Hide resolved
kafka-ui-react-app/src/components/common/JSONViewer/JSONViewer.tsx
Outdated
Show resolved
Hide resolved
kafka-ui-react-app/src/components/Topics/Topic/Details/Messages/MessageItem.tsx
Outdated
Show resolved
Hide resolved
SonarCloud Quality Gate failed. |
Kudos, SonarCloud Quality Gate passed! |
* Implement functionality for copying and downloading data * Test
Now there are 2 buttons over each Content field of the Messages table.
If you hover over any of them there will be a popup hint which tells the user what this button does:
The first button will copy the Content to the clipboard and the second will trigger a file download (
.json
if the content is an object orJSON.parse
doesn't throw an exception;.txt
otherwise.)