-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] Modify columns and sort when switching index pattern #74336
[Discover] Modify columns and sort when switching index pattern #74336
Conversation
@elasticmachine merge upstream |
…ns-on-index-pattern-switch
…-05-discover-modify-columns-on-index-pattern-switch
…attern-switch' of github.com:kertal/kibana into kertal-pr-2020-08-05-discover-modify-columns-on-index-pattern-switch
…-05-discover-modify-columns-on-index-pattern-switch
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
…ns-on-index-pattern-switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with and without advanced setting and works well, LGTM. Not sure about the unknown fields case but not a blocker
} as IndexPattern; | ||
|
||
describe('Discover getSwitchIndexPatternAppState', () => { | ||
test('removing fields that are not part of the next index pattern, keeping unknown fields ', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the reasoning behind this? How would a user run into this case and why would they want to keep the unknown fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tic#74336) * Modify columns and sort when switching index pattern * Add unit tests * Add uiSetting to allow switch to legacy behavior
* master: (85 commits) Refactor attribute service (elastic#78414) [APM] Add default message to alerts. (elastic#78930) [Discover] Modify columns and sort when switching index pattern (elastic#74336) Document ts project references setup (elastic#78586) build all ts refs in single kbn:bootstrap (elastic#79438) [TSVB] Allow string fields on value count aggregation (elastic#79267) [SECURITY SOLUTION] Investigate EQL signal in timeline (elastic#79049) [Fleet] Add loading spinner to page headers (elastic#79568) [Security Solution][Resolver] Resolver query panel load more (elastic#79160) Add type row to monitor detail page. (elastic#79556) Remove license refresh from setup (elastic#79518) [docker] add reporting fonts (elastic#74806) [SECURITY_SOLUTION][ENDPOINT] Add info about trusted apps to the page subtitle + create flyout (elastic#79558) Trim Hash value before validating it (elastic#79545) Warn users when security is not configured (elastic#78545) update copy styling (elastic#79313) Update dependency @elastic/charts to v23.1.1 (elastic#78459) Introduce geo-threshold alerts (elastic#76285) elastic#76920 Show base breadcrumb when there is an error booting the app (elastic#79571) remove react-intl from kibana and keep it inside only i18n package (elastic#78956) ...
…) (#79616) * Modify columns and sort when switching index pattern * Add unit tests * Add uiSetting to allow switch to legacy behavior
Summary
When switching index pattern in Discover, this PR removes the columns and sort that are not available in the new index pattern. Selected fields that are neither part of the current and next index pattern are not removed (E.g.
products
of ourkibana_sample_data_ecommerce
). In the following example, when switching index patternDistanceKilometers
&DistanceMiles
are remove because they are not part of thekibana_sample_data_commerce
index pattern. And since no other column, that both index patterns share, was selected,_source
as default column is displayed.You can opt out in Advanced Settings if you prefer the columns not to be modified
Fixes #57322
Fixes #45557
Fixes #45988
Fixes #54653
Checklist