-
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
Field list - from indexed array to arrays and maps #47921
Field list - from indexed array to arrays and maps #47921
Conversation
142511e
to
08ad9ad
Compare
💔 Build Failed
|
💔 Build Failed
|
1b2f34c
to
febac6e
Compare
💔 Build Failed |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
retest |
💚 Build Succeeded |
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.
code LGTM
remove(field: FieldType): void; | ||
} | ||
|
||
export class FieldList extends Array<Field> implements FieldListInterface { |
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.
nit: can we loose extends Array as thats already part of FieldListInterface definition ?
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.
It appears to be needed. Seems that FieldList doesn't inherit that trait from FieldListInterface.
(function flatten(obj, keyPrefix = '') { | ||
keyPrefix = keyPrefix ? keyPrefix + '.' : ''; | ||
_.forOwn(obj, function(val, key) { | ||
key = keyPrefix + key; | ||
|
||
if (deep) { | ||
const isNestedField = fields[key] && fields[key].type === 'nested'; | ||
const field = fields(key); |
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 see .. nice :)
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.
Canvas changes LGTM 👍
@elasticmachine merge master |
@elasticmachine update branch |
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.
ML changes LGTM
💚 Build Succeeded |
* make fieldList extend array
💚 Build Succeeded |
Summary
Changed field list from indexed array to a native array and maps.
The field list interface is here - https://github.com/elastic/kibana/pull/47921/files#diff-7fdc99852731187e4db7a38a227962abR25
The rest of the pr concerns changes related to consuming the altered api.
[x] Test with beats - thousands of fields
addresses #43440