-
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
Sharing saved objects phase 3.5 #100424
Sharing saved objects phase 3.5 #100424
Conversation
d82b858
to
64c8014
Compare
This is used in feature-specific contexts for SpaceList and ShareToSpaceFlyout components, so the rendered avatar for a space is in a disabled state if the feature is disabled in that space.
…ient Add support for `resolve` method to the public SOC client abstraction. This was overlooked in Sharing Saved Objects Phase 2 because it does not use the same type definitions as the server-side SOC client. Also added the `namespaces` field to the SimpleSavedObject type, which is always present as of several releases ago.
A user is authorized to change a legacy URL alias if they are have privileges to modify the target object. TODO: add an HTTP route for this API
Before, only the target object would be updated.
When sharing an object, we include all of its references *except* for tags. Note, this does not preclude tags from being shared directly.
64c8014
to
bc7e2fa
Compare
@legrego @watson this is ready for a draft review whenever you are ready. What changes are already included:
Next I have to add:
For the usage data, I think we could just add another counter value for the "disableLegacyUrlAliases" HTTP API route and call it a day. Thoughts? |
bc7e2fa
to
ce1a020
Compare
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.
General code/structure looks good to me. I haven't manually tested this yet, but I'll do so once you have the rest of the UI changes in place.
For the usage data, I think we could just add another counter value for the "disableLegacyUrlAliases" HTTP API route and call it a day. Thoughts?
What types of questions do we want to answer with this information? If I understand correctly, this would just tell us how often the endpoint was called, but not how many aliases have been disabled.
...plugins/saved_objects_management/public/management_section/object_view/saved_object_view.tsx
Outdated
Show resolved
Hide resolved
...ins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx
Outdated
Show resolved
Hide resolved
...ins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx
Outdated
Show resolved
Hide resolved
...ins/saved_objects_management/public/management_section/objects_table/saved_objects_table.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.ts
Outdated
Show resolved
Hide resolved
These were broken after the latest merge from master.
After thinking on it some more, we probably want to be able to answer:
We already have standard Core usage stats fields for the For questions 1-3: we should update the Core usage data service to fetch alias data from the Kibana index to answer the first three questions. For question 4: we should add the following Core usage stats fields that are incremented whenever SOR.resolve is called:
For question 5: we should add the following Spaces usage stats field that is incremented whenever the
Thoughts? |
...plugins/saved_objects_management/public/management_section/object_view/saved_object_view.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/security/server/spaces/secure_spaces_client_wrapper.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/spaces/public/share_saved_objects_to_space/components/relatives_control.tsx
Outdated
Show resolved
Hide resolved
.../plugins/spaces/public/share_saved_objects_to_space/components/selectable_spaces_control.tsx
Outdated
Show resolved
Hide resolved
...plugins/spaces/public/share_saved_objects_to_space/components/selectable_spaces_control.scss
Outdated
Show resolved
Hide resolved
...ins/spaces/public/share_saved_objects_to_space/components/share_to_space_flyout_internal.tsx
Show resolved
Hide resolved
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.
You can never be sure with SO features, but LGTM
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.
LGTM!
...plugins/spaces/public/share_saved_objects_to_space/components/selectable_spaces_control.scss
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Saved Objects .kibana field count
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Resolves: #100686 and #81605.
Changes
Primary changes are:
resolve
API andnamespaces
field (will be needed for future consumers)Screenshots
Click to expand
Share with relatives:
Share and disable aliases:
Delete modal:
Manual testing procedures
A. Setup:
Uncomment code to enable Spaces column in Saved Object Mgmt page:
Click to show diff
Install the Sharing Saved Objects Test Plugin
Start Kibana
Navigate to the "barney" app and generate new toys
Navigate to Kibana Dev Tools and create the 26 test spaces:
Click to show command
Navigate to the Saved Objects Management screen
B. Share an object with references:
Each of the four Army Men objects has a reference to the other three. If you share one of them, the other three should be shared too.
C. Share an object and disable legacy URL aliases
The Sheriff Woody object has legacy URL aliases in 27 spaces: 26 for the alphabet (Alpha, Bravo, Charlie, etc.), and one in an additional space (
---
).---
space which does not exist