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

fix(requests): remove duplicate queries #249

Merged
merged 5 commits into from
Aug 26, 2021

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Aug 24, 2021

Fixes #248

Testing procedure is similar to #247: open the browser devtools or watch the Cryostat backend logs and check how many queries are made
to various endpoints when navigating around the application.

Before this PR, duplicate requests are made when visiting the Events view (two queries for templates and two for event types), and when visiting the Recordings view (two for active recordings and two for archived recordings). When visiting the Recordings view, multiple GET /api/v1/reports/:reportName or GET /api/v1/targets/:targetId/reports/:recordingName will also be observed. After this PR, each of these API endpoints is queried only once on navigation (note that active recordings and archived recordings may both show as simply recordings in your browser devtools since the last component of the API path is the same - however, closer inspection should reveal that one is for GET /api/v1/recordings (archived) and one for GET /api/v1/targets/:targetId/recordings (active)). The "reports" requests should only be observed when the graphical dropdown element that contains the report frame is opened.

@jan-law
Copy link
Contributor

jan-law commented Aug 25, 2021

Looks good to me, the UI is working as expected

Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Works nicely

@andrewazores andrewazores merged commit 19c80af into cryostatio:main Aug 26, 2021
@andrewazores andrewazores deleted the double-queries branch August 26, 2021 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate queries
3 participants