Skip to content

Commit

Permalink
[Maps] Migrate Maps embeddables to NP (elastic#63976)
Browse files Browse the repository at this point in the history
* Migrate maps embeddables. Clean up legacy presence

* Fix type error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
Aaron Caldwell and elasticmachine committed Apr 23, 2020
1 parent c42a2d0 commit a5ad497
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/maps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export function maps(kibana) {
tilemap: _.get(mapConfig, 'tilemap', []),
};
},
embeddableFactories: ['plugins/maps/embeddable/map_embeddable_factory'],
styleSheetPaths: `${__dirname}/public/index.scss`,
savedObjectSchemas: {
'maps-telemetry': {
Expand Down

This file was deleted.

4 changes: 3 additions & 1 deletion x-pack/plugins/maps/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"configPath": ["xpack", "maps"],
"requiredPlugins": [
"inspector",
"licensing",
"home",
"data",
"fileUpload",
"uiActions",
"navigation",
"visualizations"
"visualizations",
"embeddable"
],
"ui": true
}
7 changes: 6 additions & 1 deletion x-pack/plugins/maps/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ import { getMapsVisTypeAlias } from './maps_vis_type_alias';
import { HomePublicPluginSetup } from '../../../../src/plugins/home/public';
import { VisualizationsSetup } from '../../../../src/plugins/visualizations/public';
import { registerLayerWizards } from './layers/load_layer_wizards';
import { MAP_SAVED_OBJECT_TYPE } from '../common/constants';
import { MapEmbeddableFactory } from './embeddable';
import { EmbeddableSetup } from '../../../../src/plugins/embeddable/public';

export interface MapsPluginSetupDependencies {
inspector: InspectorSetupContract;
home: HomePublicPluginSetup;
visualizations: VisualizationsSetup;
embeddable: EmbeddableSetup;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface MapsPluginStartDependencies {}
Expand Down Expand Up @@ -102,12 +106,13 @@ export class MapsPlugin
MapsPluginStartDependencies
> {
public setup(core: CoreSetup, plugins: MapsPluginSetupDependencies) {
const { inspector, home, visualizations } = plugins;
const { inspector, home, visualizations, embeddable } = plugins;
bindSetupCoreAndPlugins(core, plugins);

inspector.registerView(MapView);
home.featureCatalogue.register(featureCatalogueEntry);
visualizations.registerAlias(getMapsVisTypeAlias());
embeddable.registerEmbeddableFactory(MAP_SAVED_OBJECT_TYPE, new MapEmbeddableFactory());
}

public start(core: CoreStart, plugins: any) {
Expand Down

0 comments on commit a5ad497

Please sign in to comment.