Skip to content

new-log-viewer: Add support for exporting decoded logs as a file.#72

Merged
Henry8192 merged 26 commits intoy-scope:mainfrom
Henry8192:export-logs
Sep 23, 2024
Merged

new-log-viewer: Add support for exporting decoded logs as a file.#72
Henry8192 merged 26 commits intoy-scope:mainfrom
Henry8192:export-logs

Conversation

@Henry8192
Copy link
Copy Markdown
Contributor

@Henry8192 Henry8192 commented Sep 15, 2024

References

Description

Add "Export Logs" button to download the current uncompressed logs.
The button triggers exportLogs function defined in StateContextProvider, which posts a EXPORT_LOG worker request to MainWorker. The worker parses log events into chunks in loadChunk and posts CHUNK_DATA responses back to StateContextProvider. It appends the posted log chunk using logExportManager, which triggers a download when it receives all log chunks.

Validation performed

Click download button, the logs are downloaded with timestamped fileNames. Click download button multiple times, the logs are downloaded with different timestamps.

Henry8192 and others added 2 commits September 16, 2024 12:43
@Henry8192 Henry8192 marked this pull request as ready for review September 17, 2024 16:27
@Henry8192 Henry8192 changed the title Export Logs draft new-log-viewer: add export logs to download decompressed logs Sep 17, 2024
Copy link
Copy Markdown
Member

@junhaoliao junhaoliao left a comment

Choose a reason for hiding this comment

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

Looks really good. Let's address the final comments.

Co-authored-by: Junhao Liao <junhao@junhao.ca>
@junhaoliao
Copy link
Copy Markdown
Member

How about changing the PR title to

Add log export feature to download all decoded logs as a file.

@Henry8192 Henry8192 changed the title new-log-viewer: add export logs to download decompressed logs new-log-viewer: Add log export feature to download all decoded logs as a file. Sep 18, 2024
@junhaoliao
Copy link
Copy Markdown
Member

All my concerns have been addressed. @Henry8192, @junhaoliao, please review the latest changes I made.

For the PR title, how about:

new-log-viewer: Add support for exporting decoded logs as a file.

I agree with Kirk's proposal of the PR title.

@Henry8192 Henry8192 changed the title new-log-viewer: Add log export feature to download all decoded logs as a file. new-log-viewer: Add support for exporting decoded logs as a file. Sep 23, 2024
@Henry8192 Henry8192 merged commit d185624 into y-scope:main Sep 23, 2024
@Henry8192 Henry8192 deleted the export-logs branch September 24, 2024 19:12
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.

3 participants