-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
Follow-up of #50308
The SO management section was migrated, however there are still a lot of cleanup that could still be done in this code:
- See if we could get rid off the
SavedObjectLoaderusages (major)
These per-so-type loaders could probably be replaced by more simple and generic calls to the SO client API. Getting rid of that would remove a very heavy and deprecated dependency to the so client-side plugin. However there are a lot of usages in the SO management plugin, so this needs some inspection first to ensure everything could be adapted, and how.
- Extract modals from the
SavedObjectsTablecomponent
The two modals (in renderDeleteConfirmModal and renderExportAllOptionsModal) should be extracted to their own components to increase testability and reduce the SavedObjectsTable component size.
- Add API integration tests for the
allowed_typesroute
Even if effectively covered by the functional tests, this endpoint lacks API integration tests.
- Migrate the SO management functional tests in
test/functional/apps/management
The _mgmt_import_saved_objects.js and _import_objects.js test suites should be migrated to TS (trivial) and moved to test/functional/apps/saved_objects_management. Seems there is a trick here with the way the data is loaded for the whole management super-suite, as just moving the files and copying the data loads resulted in test failures.
- Fix the re-export mess in
src/legacy/core_plugins/management/public/index.ts
This file re-export types and functions from the saved_objects_management plugin. This should be removed, and usages be adapted to directly use the SOM plugin.
- Improve typings in the
saved_objects_tablecomponents
The components props and states in management_section/objects_table/components/* could be improved. Some properties are still any, and would need some inspection to find their correct types if present.