Skip to content
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

Update frontend data #66

Merged

Conversation

joaoantoniocardoso
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso commented Oct 22, 2024

reworked_ui_with_stats.mp4

Closes #50

@joaoantoniocardoso joaoantoniocardoso force-pushed the update_frontend_data branch 4 times, most recently from 02cb4ac to 945a560 Compare October 29, 2024 15:46
src/lib/web/mod.rs Show resolved Hide resolved
src/webpage/src/stats/mod.rs Outdated Show resolved Hide resolved
@joaoantoniocardoso joaoantoniocardoso force-pushed the update_frontend_data branch 6 times, most recently from 608d7e7 to 13af843 Compare November 4, 2024 23:33
@joaoantoniocardoso joaoantoniocardoso marked this pull request as ready for review November 4, 2024 23:39
.gitignore Outdated Show resolved Hide resolved
src/lib/web/endpoints.rs Outdated Show resolved Hide resolved
src/lib/stats/actor.rs Outdated Show resolved Hide resolved
src/lib/stats/actor.rs Outdated Show resolved Hide resolved
src/lib/stats/actor.rs Outdated Show resolved Hide resolved
}

#[derive(Debug, Clone, Default, Deserialize)]
pub struct ByteStatsSample {
Copy link
Member

Choose a reason for hiding this comment

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

Why not getting it from the lib ?

Copy link
Member Author

@joaoantoniocardoso joaoantoniocardoso Nov 7, 2024

Choose a reason for hiding this comment

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

It was the original plan, but the Implementations fail to compile for wasm32, and the change to organize the lib to make that easy is quite massive... I can do that if we prefer.

The first option is to pollute all lib/stats code with #[cfg(not(target_arch = "wasm32"))] switch flags, which makes the code very annoying.

The second option is to break the code into smaller modules: (1) mods that have the types, and (2) mods that have the implementation. These last are then selected with the switch flags, polluting only the imports. The mods can be all in separate files, or mod contexts.

Let me know if you have other ideas, and what you prefer

src/webpage/src/stats/stats_frequency.rs Outdated Show resolved Hide resolved
src/webpage/src/app.rs Show resolved Hide resolved
src/webpage/src/app.rs Show resolved Hide resolved
src/webpage/src/app.rs Show resolved Hide resolved
@joaoantoniocardoso joaoantoniocardoso force-pushed the update_frontend_data branch 2 times, most recently from f5e0477 to 3fe2b19 Compare November 8, 2024 18:24
@patrickelectric patrickelectric merged commit 6051127 into bluerobotics:master Nov 8, 2024
8 checks passed
@joaoantoniocardoso joaoantoniocardoso deleted the update_frontend_data branch November 8, 2024 19:05
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.

Make frontend use stats from stats instead of from hub
2 participants