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

Convert saved objects UI to use new import / export API #33513

Merged
merged 23 commits into from
Apr 9, 2019

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Mar 19, 2019

This PR changes the saved objects management UI to use the new server side APIs for import / export. This also keeps backwards compatibility for old exports (.json files) but displays a warning message that the feature is deprecated.

Other changes in this PR:

Fixes #27306
Fixes #22550
Fixes #23557
Fixes #29747
Fixes #25020

@mikecote mikecote added 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 Mar 19, 2019
@mikecote mikecote self-assigned this Mar 19, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@mikecote
Copy link
Contributor Author

Jenkins, test this

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@mikecote mikecote force-pushed the saved-object/import-export-ui branch from 95088f9 to 3ed632d Compare April 1, 2019 20:06
@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@mikecote
Copy link
Contributor Author

mikecote commented Apr 3, 2019

UI modifications:
Screen Shot 2019-04-03 at 11 35 25 AM
Screen Shot 2019-04-03 at 11 35 33 AM

@mikecote
Copy link
Contributor Author

mikecote commented Apr 3, 2019

@gchaps I'm trying to find a better alternative than Include all nested references in the screenshots above. Basically it it needs to let the users know that it will export everything the saved object depends on.

For example exporting a dashboard with the option enabled will include visualizations, saved search, index patterns etc that the dashboard would need. It is a recursive option to gather all referenced objects.

Thoughts?

@mikecote
Copy link
Contributor Author

mikecote commented Apr 3, 2019

@epixa should the option to include nested references be turned on by default? (as I have in the screenshot above)

@elasticmachine

This comment has been minimized.

@epixa
Copy link
Contributor

epixa commented Apr 3, 2019

@mikecote works for me!

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

@elasticmachine

This comment has been minimized.

Copy link
Contributor

@joshdover joshdover left a comment

Choose a reason for hiding this comment

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

First pass, still have a few things to review and test.

@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
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@joshdover joshdover left a comment

Choose a reason for hiding this comment

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

Tested the various edge cases and it all LGTM. Thanks for refactoring some of the logic for testability.

@mikecote mikecote merged commit 962722a into elastic:master Apr 9, 2019
mikecote added a commit to mikecote/kibana that referenced this pull request Apr 9, 2019
* Initial work converting UI to use new server side APIs

* Remove missed file

* Fix jest tests

* Code cleanup pt1

* Fix file casing

* Fix jest tests

* Modify UI to support including nested references

* Fix button layout

* Connect includeReferencesDeep, remove references_missing_references logic

* Fix broken tests

* Cleanup

* Display success notifications and auto close modals on export

* More code cleanup

* Log to server when user imports using legacy .json file

* Final cleanup

* Update test snapshots to match updated text

* Apply PR feedback pt1

* Remove isLoading and wasImportSuccessful state variables, use single status variable instead

* Move business logic out of flyout component

* Apply PR feedback

* Update wordings
mikecote added a commit that referenced this pull request Apr 9, 2019
)

* Initial work converting UI to use new server side APIs

* Remove missed file

* Fix jest tests

* Code cleanup pt1

* Fix file casing

* Fix jest tests

* Modify UI to support including nested references

* Fix button layout

* Connect includeReferencesDeep, remove references_missing_references logic

* Fix broken tests

* Cleanup

* Display success notifications and auto close modals on export

* More code cleanup

* Log to server when user imports using legacy .json file

* Final cleanup

* Update test snapshots to match updated text

* Apply PR feedback pt1

* Remove isLoading and wasImportSuccessful state variables, use single status variable instead

* Move business logic out of flyout component

* Apply PR feedback

* Update wordings
chandlerprall pushed a commit to chandlerprall/kibana that referenced this pull request Apr 15, 2019
* Initial work converting UI to use new server side APIs

* Remove missed file

* Fix jest tests

* Code cleanup pt1

* Fix file casing

* Fix jest tests

* Modify UI to support including nested references

* Fix button layout

* Connect includeReferencesDeep, remove references_missing_references logic

* Fix broken tests

* Cleanup

* Display success notifications and auto close modals on export

* More code cleanup

* Log to server when user imports using legacy .json file

* Final cleanup

* Update test snapshots to match updated text

* Apply PR feedback pt1

* Remove isLoading and wasImportSuccessful state variables, use single status variable instead

* Move business logic out of flyout component

* Apply PR feedback

* Update wordings
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
5 participants