Inaccurate: "0" performance tests results being reported
Description
On this page, 0 is the number of performance tests being displayed, despite the fact that over 160,000 tests have been run.
Expected Behavior
The number of tests runs increases over time and should be dynamically retrieved (as they have previously been) from https://cloud.layer5.io/api/performance/results/total.
See https://github.com/layer5io/layer5/blob/master/src/sections/Counters/index.js. Debug, and ensure the number is once again displayed.
Screenshots
Contributor Resources and Handbook
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.
- π See contributing instructions.
- π¨ Wireframes and designs for Layer5 site in Figma (open invite)
- ππΎππΌ Questions: Discussion Forum and Community Slack.
Join the Layer5 Community by submitting your community member form.
reply_target: layer5io/layer5#7860
The counter stays at 0 because of a property name mismatch in src/sections/Counters/index.js. The API at cloud.layer5.io/api/performance/results/total returns JSON in camelCase β {"totalRuns": 160375} β but the component reads result.total_runs (snake_case). JavaScript resolves the wrong key to undefined, and since the counter is initialised at useState(0), it sits there regardless of the API response.
Fix is changing result.total_runs to result.totalRuns on the relevant line.
Can i Resolve this issue, I have good JavaScript skills!
@leecalcote @KatalKavya96 I have linked a Pull request #7870 , Can you please Review it once?
@leecalcote @Sbragul26 can you assign this task to me. I have good experience with backend
@FaizanCyber007 Go ahead!!
Hi @leecalcote, I'd like to work on this issue. I've read the CONTRIBUTING.md and plan to inspect src/sections/Counters/index.js, reproduce the issue locally, and debug the performance-results API integration to determine why the counter is displaying 0. If assigned, I'll submit a focused fix with appropriate testing.