-
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
POC - Sharing index patterns #95958
POC - Sharing index patterns #95958
Conversation
f20e0c0
to
b2d6556
Compare
1149978
to
9273ee1
Compare
Add support for `resolve` method to the public SOC client abstraction. This was overlooked in Sharing Saved Objects Phase 2, but it will be added in Phase 3.
Splitting this out into a separate commit as it is a prerequisite for converting index patterns to namespaceType 'multiple-isolated' but it is really a separate change in a different plugin.
This will happen in the 8.0 release. It requires that index patterns are retrieved with the `resolve` API, and that the various resolve outcomes are handled appropriately on the client side using the appropriate Spaces APIs.
This will happen in an 8.x release. It allows index patterns to be shared to multiple spaces. This commit also changes the index pattern UI to add a spaces list column and a share to space action.
9273ee1
to
f90490c
Compare
It seems like this should error and offer to replace the previously copied index pattern with the shared index pattern. Then there wouldn't be a conflict case. |
This is an old POC that has been superseded by #107256 😄 Since this was created, we did add an extra check at share time to prevent legacy URL conflicts from occurring (see #100424). |
[skip-ci]
🚨 Notice 2021-08-19 🚨
This POC is out of date! See #107256 instead.
Note: see each commit message for more details
Overview
This PR is a proof-of-concept to:
resolve
API, and display some extra UI elements in case of issues with the newly introduced Legacy URL aliasesIt also includes some preliminary commits to add support for the SOC
resolve
API in the SOC abstractions that theindex_pattern_management
plugin utilizes.Not included
This PR is intended to demonstrate the steps it will take for a plugin author to convert a saved object to become share-capable and subsequently to become shareable. It does not include other changes such as:
How to test
Start Kibana
Using Dev Tools, load staging data
Staging data
Navigate to Home, then load "Sample eCommerce orders" data
Navigate to Stack Management > Index Patterns to observe two index patterns that are visible in the Default space
Index Patterns page screenshot
The staging data simulates the following scenario:
Now you can load the following URLs to test how index pattern IDs are resolved:
Default space:
/app/management/kibana/indexPatterns/patterns/ff959d40-b880-11e8-a6d9-e546fe2bba5f#/?_a=(tab:indexedFields)
-- this will result inoutcome: "exactMatch"
, with no changes in the UIAlpha space:
/s/alpha/app/management/kibana/indexPatterns/patterns/ff959d40-b880-11e8-a6d9-e546fe2bba5f#/?_a=(tab:indexedFields)
-- this will result inoutcome: "aliasMatch"
, and it will redirect the user to the new URL for the updated object ID (b75d094a-3b91-5d44-848c-4ccbe1338cf7
) and display a toast messageToast screenshot
Bravo space:
/s/bravo/app/management/kibana/indexPatterns/patterns/ff959d40-b880-11e8-a6d9-e546fe2bba5f#/?_a=(tab:indexedFields)
-- this will result inoutcome: "conflict"
, and it will show a callout to the user at the top of the page with an appropriate warning messageCallout screenshot
If you go back to the Index Patterns page and share an object, you can observe that the index pattern is refreshed and the "Shared spaces" column is updated accordingly.