-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Add support for scripted fields and aliases to the existence API #54064
[Lens] Add support for scripted fields and aliases to the existence API #54064
Conversation
@elasticmachine merge upstream |
…s/kibana into lens/existence-scripted-alias
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…s/kibana into lens/existence-scripted-alias
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
toDate?: string; | ||
fields: Field[]; | ||
}) { | ||
if (!timeFieldName || !fromDate || !toDate) { |
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.
Not using timeFieldName is a bug, but I will try to fix this later #53666
mappings, | ||
fieldDescriptors, | ||
}; | ||
} |
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'm going to see the performance hit of this, it's a bit worrying that it uses 3 network requests to get the index pattern data, and a 4th to get the existence info.
name: field.name, | ||
isScript: !!field.scripted, | ||
isAlias: !!aliasMap[field.name], | ||
path: path.split('.'), |
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 think you're allowed to have dots in field names without being nested, but it works fine for most use.
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 and code LGTM with comments. I will follow up to try to address the time field issue.
Pinging @elastic/kibana-app (Team:KibanaApp) |
…PI (elastic#54064) * Add support for scripted fields and default index pattern * Add scripted fields and aliases to existence API * Fix TypeScript errors. * Fix mappings parsing * Default to the index pattern timeFieldName Co-authored-by: Elastic Machine <[email protected]>
…PI (#54064) (#54771) * Add support for scripted fields and default index pattern * Add scripted fields and aliases to existence API * Fix TypeScript errors. * Fix mappings parsing * Default to the index pattern timeFieldName Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Chris Davies <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…PI (elastic#54064) * Add support for scripted fields and default index pattern * Add scripted fields and aliases to existence API * Fix TypeScript errors. * Fix mappings parsing * Default to the index pattern timeFieldName Co-authored-by: Elastic Machine <[email protected]>
Currently, scripted fields and aliases are always hidden unless the user selects "show all fields". This fixes that by handling scripted fields and aliases in the Lens field existence API.
Release note
Lens now lets you use scripted fields and
alias
fields.