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

Query/group details make API call to fetch data #63

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

deshsidd
Copy link
Collaborator

@deshsidd deshsidd commented Jan 23, 2025

Description

Ensure that the url for the query/group details page now contains to, from and id. The query/group details page should make an API call to the backend to fetch the details to populate on the page. Previously we were passing this information from the parent page.

UI changes corresponding to the following backend changes : opensearch-project/query-insights#195

Change details:

  1. Update the QueryDetails test and QueryGroupDetails test
  2. Add to, from and id as url params for the query/group details page
  3. Fetch query/group details based on the url params passed and populate the page
  4. Create DateUtils and QueryUtils for cleaner code
  5. Minor refactoring

Issues Resolved

closes: #42
closes: #12

Testing:
Tested on local.

  1. Top N queries page with groups and queries:
    image
  2. Click on query and display the query details page:
    image
  3. Click on groups and display the group details page:
    image
  4. Refresh the group details page:
    image
  5. Enter incorrect id on the group details page:
    image
  6. Enter incorrect id on the query details page:
    image
  7. Query details page with parameter missing in url:
    image

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@deshsidd deshsidd marked this pull request as ready for review January 23, 2025 22:49
Copy link
Member

@ansjcy ansjcy left a comment

Choose a reason for hiding this comment

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

Overrall looks good, could you attach some missing screenshots?

@deshsidd
Copy link
Collaborator Author

Overrall looks good, could you attach some missing screenshots?

Thanks for the review! Added the screenshots to the description.

@deshsidd deshsidd merged commit 3577141 into opensearch-project:main Jan 23, 2025
9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 23, 2025
Signed-off-by: Siddhant Deshmukh <[email protected]>
(cherry picked from commit 3577141)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deshsidd pushed a commit that referenced this pull request Jan 23, 2025
(cherry picked from commit 3577141)

Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants