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
SavedObjectLoader usages (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
SavedObjectsTable component
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_types route
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_table components
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.
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:
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
soclient-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.SavedObjectsTablecomponentThe two modals (in
renderDeleteConfirmModalandrenderExportAllOptionsModal) should be extracted to their own components to increase testability and reduce theSavedObjectsTablecomponent size.allowed_typesrouteEven if effectively covered by the functional tests, this endpoint lacks API integration tests.
test/functional/apps/managementThe
_mgmt_import_saved_objects.jsand_import_objects.jstest suites should be migrated to TS (trivial) and moved totest/functional/apps/saved_objects_management. Seems there is a trick here with the way the data is loaded for the wholemanagementsuper-suite, as just moving the files and copying the data loads resulted in test failures.src/legacy/core_plugins/management/public/index.tsThis file re-export types and functions from the
saved_objects_managementplugin. This should be removed, and usages be adapted to directly use the SOM plugin.saved_objects_tablecomponentsThe components props and states in
management_section/objects_table/components/*could be improved. Some properties are stillany, and would need some inspection to find their correct types if present.