-
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
[Graph] Fix default drilldown link on index pattern switch #34251
[Graph] Fix default drilldown link on index pattern switch #34251
Conversation
💚 Build Succeeded |
Pinging @elastic/kibana-app |
@markharwood What do you think about this? Would you say we can go with this solution for now? |
Thanks for the fix. Seems like a reasonable approach. |
💚 Build Succeeded |
@markharwood Could you approve the PR for merging? |
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.
Tried it out on master and works OK. LGTM
Summary
Somehow fixes #18522 . The problem is that on selecting an index pattern a default drilldown template is created which contains the id of the selected index pattern. If the index pattern is switched afterwards, it is not updated.
This PR adds a flag
isDefault
to the auto-drilldown-template, which marks it to re-create it on index pattern switch. If the user edits the template, it is kept even when switching between index patterns. While it fixes the bug as long as the user didn't change anything, it might not always be the expected behavior (e.g. if the user just edits the icon of the drilldown).A cleaner behavior would be removing all of the templates on index pattern switch, however this could result in data loss for the unexpecting user.
Another possibility would be making the default drilldown link readonly and non-removable, but this changes the current behavior of the UI and takes control from the user which I try to avoid.
What do you think, @timroes ?
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers