[Lens] Do not crash data panel on invalid KQL query#70712
Merged
flash1293 merged 5 commits intoelastic:masterfrom Jul 9, 2020
Merged
[Lens] Do not crash data panel on invalid KQL query#70712flash1293 merged 5 commits intoelastic:masterfrom
flash1293 merged 5 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
wylieconlon
approved these changes
Jul 6, 2020
Contributor
wylieconlon
left a comment
There was a problem hiding this comment.
Tested locally, and the workaround LGTM. The error message from esaggs would be useful if we showed it with line-breaks, but I don't think that's needed here.
| onClick={() => { | ||
| togglePopover(); | ||
| if (exists) { | ||
| togglePopover(); |
Contributor
There was a problem hiding this comment.
The previous behavior here was confusing, but actually sort of useful, where the click state could be used to debug issues with the exists logic. I don't think it needs to be changed here.
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
flash1293
added a commit
to flash1293/kibana
that referenced
this pull request
Jul 9, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
flash1293
added a commit
that referenced
this pull request
Jul 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #69734
So I think this should be handled within the query bar itself as well (maybe using the error state of the input to show something is off?). Also, the error message esaggs is emitting could be more user friendly. I will create a separate issue for the app arch team for this.
But for the specific case and in the interest of fixing this for 7.9 I think we should behave like the user has entered a query that didn't return any data:

This PR also removes the "field info" popover behavior for fields without data - it doesn't really make sense to show field info for an empty field (this simplifies the problem because otherwise we would need the same handling for the field item component).