Skip to content

Commit

Permalink
Add visual feedback on Copy JSON in Log filter page (SigNoz#2055)
Browse files Browse the repository at this point in the history
Co-authored-by: gitstart <[email protected]>
Co-authored-by: niteshsingh1357 <[email protected]>
Co-authored-by: Nitesh Singh <[email protected]>
Co-authored-by: Thiago Nascimbeni <[email protected]>
Co-authored-by: gitstart_bot <[email protected]>
  • Loading branch information
6 people committed Jan 16, 2023
1 parent bbff2b4 commit eec236a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/Logs/LogItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { blue, grey, orange } from '@ant-design/colors';
import { CopyFilled, ExpandAltOutlined } from '@ant-design/icons';
import { Button, Divider, Row, Typography } from 'antd';
import { Button, Divider, notification, Row, Typography } from 'antd';
import { map } from 'd3';
import dayjs from 'dayjs';
import { FlatLogData } from 'lib/logs/flatLogData';
Expand Down Expand Up @@ -89,6 +89,9 @@ function LogItem({ logData }: LogItemProps): JSX.Element {

const handleCopyJSON = (): void => {
setCopy(JSON.stringify(logData, null, 2));
notification.success({
message: 'Copied to clipboard',
});
};

return (
Expand Down

0 comments on commit eec236a

Please sign in to comment.