Skip to content

Conversation

untitaker
Copy link
Collaborator

@untitaker untitaker commented Jun 18, 2025

Screenshot from 2025-06-18 23-44-58
Screenshot from 2025-06-18 23-45-06

fix #409

don't know what to do with the other buttons. just remove?

@untitaker untitaker force-pushed the zip-download branch 2 times, most recently from 55a0a59 to 12e1b19 Compare June 18, 2025 21:49
@untitaker
Copy link
Collaborator Author

IMO ideally we'd have a combined dropdown + button, where if you click the button you get the ZIP by default, but there's advanced options to get PCAP and QMDL. I tried and failed to implement that using <details> and <summary> though.

@untitaker untitaker force-pushed the zip-download branch 2 times, most recently from 2337014 to 20308f6 Compare June 19, 2025 17:05
cooperq
cooperq previously approved these changes Jun 23, 2025
Copy link
Collaborator

@wgreenberg wgreenberg left a comment

Choose a reason for hiding this comment

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

this is great! i like it a lot more than my client-side solution. just have a few nits/comments


tokio::spawn(async move {
let result: Result<(), Error> = async {
let mut zip2 = ZipFileWriter::with_tokio(writer);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: why zip2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

leftover from the porting effort from zip to async-zip. renamed to just zip

.take(qmdl_size_bytes as u64)
};

copy(&mut qmdl_file, &mut entry_writer).await?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

ooh copy seems handy

{
let entry =
ZipEntryBuilder::new(format!("{qmdl_idx}.qmdl").into(), Compression::Stored);
let mut entry_writer = zip2.write_entry_stream(entry).await?.compat_write();
Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm not sure i understand what compat_write() is doing -- honestly it was hard even finding where the method's coming from. maybe add a comment explaining it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a comment

Copy link
Collaborator

@wgreenberg wgreenberg left a comment

Choose a reason for hiding this comment

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

oops i meant to request changes

@wgreenberg wgreenberg merged commit 0c241ab into main Jun 23, 2025
26 checks passed
@wgreenberg wgreenberg deleted the zip-download branch June 23, 2025 21:30
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.

One button to download zip of a given run as a bundle with pcap and qmdl

3 participants