Index pattern field list - transition away from extending array - introduce and use getAll()#74718
Merged
mattkime merged 2 commits intoelastic:masterfrom Aug 11, 2020
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Contributor
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
lizozom
approved these changes
Aug 11, 2020
Contributor
lizozom
left a comment
There was a problem hiding this comment.
Overall LGTM.
Added one comment for your review.
|
|
||
| export interface FieldSpec { | ||
| count: number; | ||
| count?: number; |
Contributor
There was a problem hiding this comment.
Looking at the changes in src/plugins/data/common/index_patterns/fields/index_pattern_field.ts, it seems that both functions can't return undefined. Can it be that you don't have to make these optional?
Contributor
Author
There was a problem hiding this comment.
@lizozom I'm making them optional so that someone defining a field doesn't have the burden of providing them - the expected defaults are obvious. Its not a necessary change but I think its still helpful.
mattkime
added a commit
to mattkime/kibana
that referenced
this pull request
Aug 11, 2020
…roduce and use getAll() (elastic#74718) - Introduce `indexPattern.fields.getAll()` and use where possible - Rename `index_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.ts` - FieldSpec - make `count` and `scripted` fields optional - use `indexPattern.fields.getByName` instead of filter where possible # Conflicts: # src/plugins/index_pattern_management/public/components/field_editor/field_editor.test.tsx
mattkime
added a commit
that referenced
this pull request
Aug 11, 2020
…roduce and use getAll() (#74718) (#74756) - Introduce `indexPattern.fields.getAll()` and use where possible - Rename `index_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.ts` - FieldSpec - make `count` and `scripted` fields optional - use `indexPattern.fields.getByName` instead of filter where possible
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Aug 11, 2020
* master: (106 commits) [Functional Tests] Adds a wait time between setting the index pattern and the time field on TSVB (elastic#74736) [Lens] Add styling options for x and y axes on the settings popover (elastic#71829) [Maps] add initial location option that fits to data bounds (elastic#74583) theme function (elastic#73451) [data.ui.query] Write filters to query log from default editor. (elastic#74474) [data.search.SearchSource] Move some SearchSource dependencies to the server. (elastic#74607) [Canvas][tech-debt] Convert renderers (elastic#74134) [security solutions][lists] Adds end to end tests (elastic#74473) pluralized for occurrences vs occurrence (elastic#74564) Update links that pointed to CONTRIBUTING.md (elastic#74757) [Ingest pipelines] Implement tabs in processor flyout (elastic#74469) [Event log] Use Alerts client & Actions client when fetching these types of SOs (elastic#73257) Bump chalk to 4.1.0 (elastic#73397) Index pattern field list - transition away from extending array - introduce and use getAll() (elastic#74718) [SECURITY] Bugs css/inspect (elastic#74711) [telemetry] update README to downplay ui_metrics (elastic#74635) Fixed grammar (elastic#74725) [Telemetry][API Integration] size_in_bytes to be a number (elastic#74664) [ILM] Convert node details flyout to TS (elastic#73707) [Ingest Node Pipelines] Sentence-case processor names (elastic#74645) ...
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.
Summary
Addressing #68020 - there will be a number of PRs that transition away from the field list extending the array class.
indexPattern.fields.getAll()and use where possibleindex_patterns/fields/fields.mocks.ts.ts => index_patterns/fields/fields.mocks.tscountandscriptedfields optionalindexPattern.fields.getByNameinstead of filter where possible