-
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
[Lens] show meta field data in Lens #77210
Conversation
Maybe a different section like the empty fields? |
I can definitely see a separate section in the very bottom (as they are an edge case anyway), with using the color to indicate emptiness (instead of having both “available meta fields” and “empty meta fields” sections, that seems like overkill). I will adjust the PR |
Pinging @elastic/kibana-app (Team:KibanaApp) |
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 on FF and all works well. The code looks good. Just one note that is not even related to this PR - the last element of the accordion is cut (you didn't introduce it though):
Removing the last 0
from these styles solves the problem, but as it's not related to this PR, feel free to ignore this comment :)
@mbondyra Refactored the different sections into a |
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.
👍 To the separated section. This way the user can mostly just ignore those altogether.
A few questions/feedback:
-
Should we allow users to drag-n-drop these or select them to be aggregated at all? Some of them completely error and others are most likely not unique at all.
-
Can you also update the organization within the field selector combo box?
- There's seems to be a discrepency between the messaging and the look of the
_id
field. It shows as if it has data (white bg) but the popover says it doesn't have any.
- Can we update the information icon tooltips to have better messaging per category of field?
Tooltip:
This field doesn't have any data but you can still drag and drop to visualize.
Popover:
This field is empty because it doesn’t exist in the 500 sampled documents. Adding this field to the configuration may result in a blank chart.
The messaging will depend on if we decide they can still add these to the chart, but if we say they can't then:
Tooltip:
Meta fields cannot be visualized. Click for a field preview.
|
||
return ( | ||
<div | ||
className="lnsInnerIndexPatternDataPanel__listWrapper" |
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.
Don't forget now to update class names to align with the component name and move the SASS to be imported directly by the JS component.
Thanks for taking a look, @cchaos
There are currently problems with
Great point, fixed that.
Makes sense, done
As mentioned they should be addable to the chart, everything else is a bug. To give a bit of context here, there are also plugins adding additional meta fields which are supported in Kibana used from time to time - those might be more helpful than
Thanks, moved the SASS over |
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.
Initial testing shows that there is a large performance regression with large index patterns when interacting with the filters, compared to the previous behavior.
Ah, I planned to check whether memoization and so on still works after the refactoring and forgot. I will take a look, thanks for taking performance into account 👍 |
} else if (containsData(field)) { | ||
return 'availableFields'; | ||
} else return 'emptyFields'; | ||
}), | ||
}; | ||
}, [allFields, existingFields, currentIndexPattern, hasSyncedExistingFields]); |
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.
I traced the performance, and the main issue is that this first set of memoized code is expensive to run, but is now running on each keystroke.
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.
LGTM, thanks @flash1293
x-pack/plugins/lens/public/indexpattern_datasource/field_list.tsx
Outdated
Show resolved
Hide resolved
@wylieconlon Improved the performance of field group calculation by splitting out the filtering in a separate hook like it was done before. |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
Fixes #75632
This PR makes sure meta fields are also handled correctly in terms of existence data and stats.
The biggest change here is to pass down the list of meta fields from advanced settings to the existence checker and look them up directly on the document instead of
_source
orfields
.Also, the
meta
flag is made part of the field type to introduce a new "Meta fields" section in the field list.There are two related issues due to buggy handling of meta fields in Kibana in general which also show up here:
_type
is showing up as empty. This is not a Lens bug as well, IMHO the field shouldn't even be present in the index pattern in the first place. Again, this is either an index pattern bug or an ES bug (didn't dig into it): Discover: "_type" showing up as empty #77209 It should work fine on 7.x