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

[Feature/2419] Modernize the report.html when using the --modern-ui Flag #2420

Merged
merged 5 commits into from
Oct 11, 2023

Conversation

andrewbaldwin44
Copy link
Collaborator

Changes Proposed:

  • Add a method to_dict to the StatsEntry and StatsError classes. This will allow for returning a JSON version of these classes. This will also allow for reducing complexity in the request_stats method
  • Add three new arguments to get_html_report:
    • static_path: indicates where the static files can be found
    • use_modern_ui: to allow for returning a different template with different template arguments when the --modern-ui flag is set
    • theme: allows for dark mode
  • Remove vendor chunking in vite: although this may offer slight performance benefits, in this project it is not very relevant, and for the downloaded report we need to have inline js (no imports / exports)
  • Ensured the new modern template has all the same functionality as the old template, and that the old template continues to work as expected

Demo

image image image image

@andrewbaldwin44 andrewbaldwin44 force-pushed the feature/2419 branch 2 times, most recently from 7b5a5b9 to 1eb1002 Compare October 11, 2023 11:23
@cyberw
Copy link
Collaborator

cyberw commented Oct 11, 2023

Nice! I’m on mobile, but will look into the python code asap. Can you add a unit test? One that downloads the report and checks return code and some (any) content inside it.

@cyberw cyberw merged commit 711e9fd into locustio:master Oct 11, 2023
14 of 15 checks passed
@YeungHoiChiu
Copy link

How to get this new html report when using headless model?

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