[data views] add getDefaultDataView method #113891
Merged
mattkime merged 4 commits intoelastic:masterfrom Oct 13, 2021
Merged
Conversation
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededMetrics [docs]Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
Dosant
approved these changes
Oct 13, 2021
Contributor
Dosant
left a comment
There was a problem hiding this comment.
Code lgtm,
p.s. there was no code owner ping? I think we forgot to add data_views to codeowners? Could you add it?
Contributor
💔 Backport failed
To backport manually run: |
mattkime
added a commit
to mattkime/kibana
that referenced
this pull request
Oct 13, 2021
* add new method to data views api * add tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/data_views/common/data_views/data_views.ts
mattkime
added a commit
that referenced
this pull request
Oct 13, 2021
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Oct 13, 2021
…ide-users-to-saving-ux * 'master' of github.com:elastic/kibana: (133 commits) [DOCS] Indicate reports are a subscription feature (elastic#114653) Update namespace for indices (elastic#114612) [DOCS] Adds Logstash pipeline settings (elastic#114648) Bump EPR snapshot version used for tests (elastic#114529) [Security Solution] [Endpoint] Fleet summary card adjustments (elastic#114291) skip flaky suite (elastic#68400) [Visualizations] fix usage of optional dependencies (elastic#114286) [Security Solution] [Detections] Improves custom query rule upgrade test (elastic#114454) [fleet] Add Integration Preference selector (elastic#114432) [Reporting] Add new `data-render-error` attribute (elastic#114472) Replace EuiCodeEditor with CodeEditor in app-services code (elastic#114316) [data views] add getDefaultDataView method (elastic#113891) [Security Solution] [Endpoint] Event filters uses the new card design (elastic#114126) [fleet] Tweak Header UI (elastic#114704) [APM] Filter on tx metrics for instance stats (elastic#114758) [APM] Fix typo in linting docs (elastic#114764) [Discover] Removing SavedObject usage for savedSearch (elastic#112983) [Fleet] Add Integration Policy Page Improvements (elastic#114556) [Lens] Keep the custom label when transitioning to/from Formula (elastic#114270) [Security Solution][Endpoint] Host Isolation API changes (elastic#113621) ...
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
Addresses #112362
Closes: #112846
The DataViews service has this terrible method called
ensureDefaultDataViewwhich a number of apps call when loading which a) ensures there's a default data viewand b) redirects to Data View Management if there aren't any.There's no reason why the code that ensures there's a default data view should be tied to the code that redirects if there aren't any data views at all.
The
getDefaultDataViewensures a default data view exists AND returns the default data view. Thats proper coupling. As for theensureDefaultDataView- consumers should stop using it.