fix: correct field name mismatch in performance test counters (#7860) - #7867
fix: correct field name mismatch in performance test counters (#7860)#7867Cypher-CP0 wants to merge 2 commits into
Conversation
…tal_runs) Signed-off-by: Cypher-CP0 <prabhatu4559@gmail.com>
|
Preview deployment for PR #7867 removed. This PR preview was automatically pruned because we keep only the 6 most recently updated previews on GitHub Pages to stay within deployment size limits. If needed, push a new commit to this PR to generate a fresh preview. |
KatalKavya96
left a comment
There was a problem hiding this comment.
@Cypher-CP0 The changes look good. Could you please add a short screen recording from the PR preview showing the performance test counter displaying the correct value on the affected page?
rishiraj38
left a comment
There was a problem hiding this comment.
There are too many lint-only changes, which makes it hard to review the actual code changes. Please revert the lint changes.
KhushamBansal
left a comment
There was a problem hiding this comment.
@Cypher-CP0 Could you please revert lint changes?
@Cypher-CP0 send word when you have incorporated @KhushamBansal's feedback. |
Description
This PR fixes #7860
The performance test run counters on the site (Meshery page, Nighthawk page)
were always displaying
0instead of the real run count.Root cause: the API at
https://cloud.layer5.io/api/performance/results/totalreturns
{"totalRuns": 160375}, but four components were readingresult.total_runs(snake_case) instead ofresult.totalRuns(camelCase).Since that field doesn't exist on the response, the value was always
undefined, so the counter fell back to its initial state of0.Changes made:
src/sections/Counters/index.js— fixed field name; added.catch()forerror logging instead of failing silently.
src/sections/Meshery/How-meshery-works/specs/data-card.js— fixed fieldname; this is the component actually rendered on
/cloud-native-management/meshery, the page referenced in the issue.src/sections/Projects/Nighthawk/index.js— fixed field name; rendered on/projects/nighthawk, which has the same counter bug.src/sections/Meshery/Features-Col/index.js— fixed field name in theFeaturesTablecomponent (also rendered on the Meshery page); alsochanged
console.logtoconsole.errorin the existing.catch()forconsistency with error-logging conventions used elsewhere in the codebase.
Local testing note: the API only allows CORS requests from the production
origin (
layer5.io), so this can't be fully verified fromlocalhost— itwill show a CORS error there regardless of the fix. Verified via the API's
actual response shape and will confirm final behavior on the PR preview
deployment.
Notes for Reviewers
None - straightforward field-name fix, no schema/API changes needed on our side.
Signed commits