-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Decouples saved objects management from legacy saved objects loaders #113031
Decouples saved objects management from legacy saved objects loaders #113031
Conversation
@@ -8,7 +8,6 @@ | |||
|
|||
export { fetchExportByTypeAndSearch } from './fetch_export_by_type_and_search'; | |||
export { fetchExportObjects } from './fetch_export_objects'; | |||
export { canViewInApp } from './in_app_url'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced by class method in #112034
@@ -24,6 +23,5 @@ export { getDefaultTitle } from './get_default_title'; | |||
export { findObjects } from './find_objects'; | |||
export { bulkGetObjects } from './bulk_get_objects'; | |||
export { extractExportDetails, SavedObjectsExportResultDetails } from './extract_export_details'; | |||
export { createFieldList } from './create_field_list'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer used
import { getAllowedTypes } from './../lib'; | ||
|
||
interface MountParams { | ||
core: CoreSetup<StartDependencies, SavedObjectsManagementPluginStart>; | ||
serviceRegistry: ISavedObjectsManagementServiceRegistry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the raw saved objects directly now and don't need the client-side registry.
@@ -32,7 +32,6 @@ describe('Relationships', () => { | |||
id: '1', | |||
relationship: 'parent', | |||
meta: { | |||
editUrl: '/management/kibana/objects/savedSearches/1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed these in #112034
@@ -80,8 +69,7 @@ export class SavedObjectsManagementPlugin | |||
defaultMessage: 'Saved Objects', | |||
}), | |||
description: i18n.translate('savedObjectsManagement.objects.savedObjectsDescription', { | |||
defaultMessage: | |||
'Import, export, and manage your saved searches, visualizations, and dashboards.', | |||
defaultMessage: 'Import, export, and manage your saved objects.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We support all registered saved object types and aren't restricted to those using the loaders anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to delete the key from the translation files for it to be picked for re-translation
{ "path": "../home/tsconfig.json" }, | ||
{ "path": "../kibana_react/tsconfig.json" }, | ||
{ "path": "../management/tsconfig.json" }, | ||
{ "path": "../visualizations/tsconfig.json" }, | ||
{ "path": "../saved_objects_tagging_oss/tsconfig.json" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were indirectly inheriting the saved_objects_tagging_oss
types from the visualizations
plugin. With the visualizations
dependency gone, we need to declare it explicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self review
FYI @flash1293 |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -8,7 +8,7 @@ | |||
"server": true, | |||
"ui": true, | |||
"requiredPlugins": ["management", "data"], | |||
"optionalPlugins": ["dashboard", "visualizations", "discover", "home", "savedObjectsTaggingOss", "spaces"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
@@ -80,8 +69,7 @@ export class SavedObjectsManagementPlugin | |||
defaultMessage: 'Saved Objects', | |||
}), | |||
description: i18n.translate('savedObjectsManagement.objects.savedObjectsDescription', { | |||
defaultMessage: | |||
'Import, export, and manage your saved searches, visualizations, and dashboards.', | |||
defaultMessage: 'Import, export, and manage your saved objects.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to delete the key from the translation files for it to be picked for re-translation
export interface ObjectField { | ||
type: FieldType; | ||
name: string; | ||
value: any; | ||
} | ||
|
||
export type FieldType = 'text' | 'number' | 'boolean' | 'array' | 'json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a quick grep, I think ObjectField
and FieldType
are also no longer used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! This also means we can delete the whole file 😄
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
Resolves #67607
The saved objects management plugin no longer supports legacy imports and the edit view has changed to a read-only view.
This PR handles the tech debt of removing the dependency on the loaders completely.
Checklist
For maintainers