-
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
visualize embeddable to visualizations plugin #54840
Changes from all commits
b903be4
9113a77
d8c3024
51dcb06
01bd4f2
b4a4552
c530696
6d41654
d072d27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,9 @@ import { | |
SavedObjectsClientContract, | ||
} from 'kibana/public'; | ||
|
||
// @ts-ignore | ||
import { uiModules } from 'ui/modules'; | ||
|
||
import { Storage } from '../../../../../plugins/kibana_utils/public'; | ||
import { DataPublicPluginStart } from '../../../../../plugins/data/public'; | ||
import { IEmbeddableStart } from '../../../../../plugins/embeddable/public'; | ||
|
@@ -40,14 +43,11 @@ import { | |
FeatureCatalogueCategory, | ||
HomePublicPluginSetup, | ||
} from '../../../../../plugins/home/public'; | ||
import { | ||
defaultEditor, | ||
VisEditorTypesRegistryProvider, | ||
VisualizeEmbeddableFactory, | ||
VISUALIZE_EMBEDDABLE_TYPE, | ||
} from './legacy_imports'; | ||
import { defaultEditor, VisEditorTypesRegistryProvider } from './legacy_imports'; | ||
import { UsageCollectionSetup } from '../../../../../plugins/usage_collection/public'; | ||
import { createSavedVisLoader } from './saved_visualizations/saved_visualizations'; | ||
// @ts-ignore | ||
import { savedObjectManagementRegistry } from '../management/saved_object_registry'; | ||
|
||
export interface LegacyAngularInjectedDependencies { | ||
legacyChrome: any; | ||
|
@@ -113,6 +113,7 @@ export class VisualizePlugin implements Plugin { | |
indexPatterns: data.indexPatterns, | ||
chrome: contextCore.chrome, | ||
overlays: contextCore.overlays, | ||
visualizations, | ||
}); | ||
const deps: VisualizeKibanaServices = { | ||
...angularDependencies, | ||
|
@@ -159,19 +160,32 @@ export class VisualizePlugin implements Plugin { | |
} | ||
|
||
public start( | ||
{ savedObjects: { client: savedObjectsClient } }: CoreStart, | ||
core: CoreStart, | ||
{ embeddables, navigation, data, share, visualizations }: VisualizePluginStartDependencies | ||
) { | ||
this.startDependencies = { | ||
data, | ||
embeddables, | ||
navigation, | ||
savedObjectsClient, | ||
savedObjectsClient: core.savedObjects.client, | ||
share, | ||
visualizations, | ||
}; | ||
|
||
const embeddableFactory = new VisualizeEmbeddableFactory(visualizations.types); | ||
embeddables.registerEmbeddableFactory(VISUALIZE_EMBEDDABLE_TYPE, embeddableFactory); | ||
const savedVisualizations = createSavedVisLoader({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kertal Changes how this works in this PR and it looks like it will make this logic unnecessary: #54155 @ppisljar Can you wait with your PR till that one is merged? This PR introduces There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems that PR is reviewed and just waiting for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if it happens the other way around (and this is ready first) i also don't think it should be a problem, either @kertal removes the uiModules and managementRegistry from this file, or i can do it in followup There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me, please leave a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better than a comment would be to pass in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've moved #54155 to 7.7, it's no problem to wait until this is merged in |
||
savedObjectsClient: core.savedObjects.client, | ||
indexPatterns: data.indexPatterns, | ||
chrome: core.chrome, | ||
overlays: core.overlays, | ||
visualizations, | ||
}); | ||
|
||
// TODO: remove once savedobjectregistry is refactored | ||
savedObjectManagementRegistry.register({ | ||
service: 'savedVisualizations', | ||
title: 'visualizations', | ||
}); | ||
|
||
uiModules.get('app/visualize').service('savedVisualizations', () => savedVisualizations); | ||
} | ||
} |
This file was deleted.
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 seem to now be missing the import of this index file from inside the legacy folder. So the styles won't be compiled.