Skip to content
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

Allow any type of saved object to import / export #34896

Merged
merged 86 commits into from
May 6, 2019

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Apr 10, 2019

In this PR the saved object management UI is capable of working with any type of saved object. By default some features (edit saved object, view saved object, title) will be limited until the type has extra configuration done within uiExports.savedObjectSchemas[type]. Each saved object needs to be configured to be import and exportable. The configuration is done via uiExports.savedObjectSchemas[type].isImportableAndExportable = true.

Fixes #34862.
Fixes #23165.
Fixes #34709.
Fixes #28037.
Fixes #27203.
Fixes #4265.

@mikecote mikecote added release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Saved Objects v8.0.0 v7.2.0 labels Apr 10, 2019
@mikecote mikecote self-assigned this Apr 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@mikecote

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@cqliu1 cqliu1 self-requested a review May 6, 2019 16:31
Copy link
Contributor

@cqliu1 cqliu1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I pulled down the changes locally, and import/export works for both canvas workpads and canvas elements.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mikecote mikecote merged commit 3efaf75 into elastic:master May 6, 2019
@alexfrancoeur
Copy link

woooo great work @mikecote!! Really excited to see this PR in merged 👍 🍾

mikecote added a commit to mikecote/kibana that referenced this pull request May 6, 2019
* Modify the relationships API and UI

* Remove type validation on export

* Update relationship test snapshots

* Change relationships table titles

* Change relationships UI to share one table

* Add server side logic to inject meta data into saved objects from plugins

* Manually enable each type of saved object to support

* Use injected vars to determine what types are import / exportable

* Fix some broken tests

* Remove unused translations

* Fix relationships mocha tests

* Remove tests that ensured types are restricted, functionality removed

* Move kfetch logic into separate file

* Add inAppUrl to missing types

* Add tooltip to management table titles that aren't links

* Make relationships screen support filtering by type

* Fix failing tests

* Add refresh support for inAppUrls

* Add error notifications when export API call fails

* Add relationship direction

* Fix broken tests

* Remove graph workspace from import / export

* Use parent / child terminology for relationships

* Use direct relationship terminology

* Flip view / edit logic in saved object management app

* Make config saved object redirect to advanced settings

* Fix broken tests

* Remove unused translations

* Code cleanup

* Add tests

* Add fallback overwrite confirmation object title

* Enforce supported types on import, export and resolve import errors

* Fix broken tests

* Fix broken tests pt2

* Fix broken tests pt3

* Test cleanup

* Use server.decorate to access savedobjectschemas

* Fix some broken tests

* Fix broken tests, add new title to relationships screen

* Fix some broken tests

* Handle dynamic versions

* Fix inAppUrl structure in tests

* Re-use generic canGoInApp

* Fix broken tests

* Apply maps PR feedback

* Apply PR feedback pt1

* Apply PR feedback pt2

* Add savedObjectsManagement to uiExports

* Fix broken tests

* Fix encodeURIComponent implementation

* Merge 403 and unsupported type errors into single error

* Apply suggestion

* Remove import / exportable by default, opt-in instead

* Fix type config to show up properly in the table

* Change config type title and fix tests

* Remove isImportableAndExportable where set to false (new default)

* Remove comments referencing to authorization

* Add unit tests for spaces

* Add unit tests for security plugin

* Change can* signature to be the same as their equivalent function, apply PR feedback

* Cleanup git diff

* Revert "Change can* signature to be the same as their equivalent function, apply PR feedback"

This reverts commit b657ac8.

* Revert "Add unit tests for security plugin"

This reverts commit 6287a8c.

* Revert "Add unit tests for spaces"

This reverts commit 2674a9d.

* Revert "Remove comments referencing to authorization"

This reverts commit 9618c2c.

* Revert "Merge 403 and unsupported type errors into single error"

This reverts commit 99aea10.

* Add CUSTOM_ELEMENT_TYPE for import / export

* Fix broken tests

* Fix broken tests pt2

* Prevent crashing app when inAppUrl is undefined
mikecote added a commit that referenced this pull request May 7, 2019
* Modify the relationships API and UI

* Remove type validation on export

* Update relationship test snapshots

* Change relationships table titles

* Change relationships UI to share one table

* Add server side logic to inject meta data into saved objects from plugins

* Manually enable each type of saved object to support

* Use injected vars to determine what types are import / exportable

* Fix some broken tests

* Remove unused translations

* Fix relationships mocha tests

* Remove tests that ensured types are restricted, functionality removed

* Move kfetch logic into separate file

* Add inAppUrl to missing types

* Add tooltip to management table titles that aren't links

* Make relationships screen support filtering by type

* Fix failing tests

* Add refresh support for inAppUrls

* Add error notifications when export API call fails

* Add relationship direction

* Fix broken tests

* Remove graph workspace from import / export

* Use parent / child terminology for relationships

* Use direct relationship terminology

* Flip view / edit logic in saved object management app

* Make config saved object redirect to advanced settings

* Fix broken tests

* Remove unused translations

* Code cleanup

* Add tests

* Add fallback overwrite confirmation object title

* Enforce supported types on import, export and resolve import errors

* Fix broken tests

* Fix broken tests pt2

* Fix broken tests pt3

* Test cleanup

* Use server.decorate to access savedobjectschemas

* Fix some broken tests

* Fix broken tests, add new title to relationships screen

* Fix some broken tests

* Handle dynamic versions

* Fix inAppUrl structure in tests

* Re-use generic canGoInApp

* Fix broken tests

* Apply maps PR feedback

* Apply PR feedback pt1

* Apply PR feedback pt2

* Add savedObjectsManagement to uiExports

* Fix broken tests

* Fix encodeURIComponent implementation

* Merge 403 and unsupported type errors into single error

* Apply suggestion

* Remove import / exportable by default, opt-in instead

* Fix type config to show up properly in the table

* Change config type title and fix tests

* Remove isImportableAndExportable where set to false (new default)

* Remove comments referencing to authorization

* Add unit tests for spaces

* Add unit tests for security plugin

* Change can* signature to be the same as their equivalent function, apply PR feedback

* Cleanup git diff

* Revert "Change can* signature to be the same as their equivalent function, apply PR feedback"

This reverts commit b657ac8.

* Revert "Add unit tests for security plugin"

This reverts commit 6287a8c.

* Revert "Add unit tests for spaces"

This reverts commit 2674a9d.

* Revert "Remove comments referencing to authorization"

This reverts commit 9618c2c.

* Revert "Merge 403 and unsupported type errors into single error"

This reverts commit 99aea10.

* Add CUSTOM_ELEMENT_TYPE for import / export

* Fix broken tests

* Fix broken tests pt2

* Prevent crashing app when inAppUrl is undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Saved Objects release_note:enhancement review Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.2.0 v8.0.0
Projects
None yet
9 participants