Add SO import hook / warnings API#87996
Merged
pgayvallet merged 33 commits intoelastic:masterfrom Jan 20, 2021
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-core (Team:Core) |
2 tasks
mikecote
reviewed
Jan 15, 2021
mikecote
approved these changes
Jan 15, 2021
Contributor
mikecote
left a comment
There was a problem hiding this comment.
I tested the functionality in the context of alerting's needs and LGTM 👍
azasypkin
approved these changes
Jan 18, 2021
Contributor
azasypkin
left a comment
There was a problem hiding this comment.
Changes in Spaces plugin tests LGTM and Copy to Space API/UI can be updated in a follow-up.
joshdover
approved these changes
Jan 20, 2021
Comment on lines
+204
to
+205
| /** The path (without the basePath) that the user should be redirect to to address this warning. */ | ||
| actionUrl: string; |
Contributor
There was a problem hiding this comment.
Should we name this actionPath instead of URL to make this more clear that it should be an in-app path and cannot be an external URL?
rudolf
approved these changes
Jan 20, 2021
Contributor
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
pgayvallet
added a commit
to pgayvallet/kibana
that referenced
this pull request
Jan 20, 2021
* initial commit * adapt client-side signatures * more type fixes * adapt api IT asserts * fix some unit tests * fix more test usages * fix integration tests * fix FT test assertions * fix FT test assertions * add FTR API integ test suite * create the plugin_api_integration test suite * adapt and fix flyout tests * update documentation * update generated doc * add unit tests for `executeImportHooks` * wire resolve_import_errors and add unit tests * move hooks registration to SO type API * update generated doc * design integration * update generated doc * Add FTR tests for import warnings * deletes plugins api integ tests * self review * move onImport to management definition * update license header * rename actionUrl to actionPath
jportner
added a commit
to jportner/kibana
that referenced
this pull request
Jan 20, 2021
Fix merge conflicts from elastic#87996.
pgayvallet
added a commit
that referenced
this pull request
Jan 20, 2021
* initial commit * adapt client-side signatures * more type fixes * adapt api IT asserts * fix some unit tests * fix more test usages * fix integration tests * fix FT test assertions * fix FT test assertions * add FTR API integ test suite * create the plugin_api_integration test suite * adapt and fix flyout tests * update documentation * update generated doc * add unit tests for `executeImportHooks` * wire resolve_import_errors and add unit tests * move hooks registration to SO type API * update generated doc * design integration * update generated doc * Add FTR tests for import warnings * deletes plugins api integ tests * self review * move onImport to management definition * update license header * rename actionUrl to actionPath
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
Fix #84977
This PR adds hook support to SO imports. Type owners can now register an import hook using the new
SavedObjectType.onImportproperty when registering their type viaregisterType.The import hooks currently only support a single feature: returning import warnings that will be displayed to the user when the import succeeds.
API usage example
Screenshots
How to test
I personally used this diff to add warnings to dashboards during testing
Checklist
Delete any items that are not applicable to this PR.