Skip to content

fix(dashboards-eap): Open in Explore passing aggregates as fields #90078

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

Conversation

narsaynorath
Copy link
Member

@narsaynorath narsaynorath commented Apr 22, 2025

Fixes the Open in Explore flows from Dashboards. The main issue is that field shouldn't be populated in the query params unless we're setting columns for the sample mode, and they should not contain aggregates. The consequence of the previous behaviour is that aggregates would appear for individual samples in the samples view, which is not a valid state.

The following test cases have been updated

  • Table with aggregates
    • Produces a URL to Aggregate Mode with the columns in the group by and aggregates in a visualize object
  • Tables without aggregates
    • Produces a URL to Samples Mode with no grouping set and columns set in the field query params
  • Charts do not add field to the query params
    • Charts by definition are plotting an aggregate, so put the chart in aggregate mode and the only columns that apply are in the groupBy param

Fixes EXP-177; The sorting is resolved because the user cannot get into a state in the samples table where the columns are not valid and therefore not properly triggering a request when the columns are clicked.

@narsaynorath narsaynorath requested a review from a team as a code owner April 22, 2025 17:25
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 22, 2025
@narsaynorath narsaynorath merged commit 9c0236a into master Apr 23, 2025
47 checks passed
@narsaynorath narsaynorath deleted the nar/fix/dashboards-eap-open-in-explore-url-passing-aggregates-as-fields branch April 23, 2025 16:09
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #90078      +/-   ##
==========================================
- Coverage   87.74%   77.78%   -9.96%     
==========================================
  Files       10226    10226              
  Lines      577031   577029       -2     
  Branches    22669    22669              
==========================================
- Hits       506298   448870   -57428     
- Misses      70290   127716   +57426     
  Partials      443      443              

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants