Skip to content

Commit

Permalink
## Which problem is this PR solving?
Browse files Browse the repository at this point in the history
- Resolves #663 - fix format of a downloaded json file

## Short description of the changes
- fix a format of a downloaded file to be able to use for uploading back into the UI

Signed-off-by: katarzyna <[email protected]>
  • Loading branch information
Katarzyna-B committed Mar 27, 2023
1 parent 590cf8c commit 8ec45d7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class UnconnectedSearchResults extends React.PureComponent<SearchResultsP
};

onDownloadResultsClicked = () => {
const file = new Blob([JSON.stringify(this.props.rawTraces)], { type: 'application/json' });
const file = new Blob([`{"data":${JSON.stringify(this.props.rawTraces)}}`], { type: 'application/json' });
const element = document.createElement('a');
element.href = URL.createObjectURL(file);
element.download = `traces-${Date.now()}.json`;
Expand Down

0 comments on commit 8ec45d7

Please sign in to comment.