Skip to content

Commit

Permalink
Handle feature catalogue entry in NP. Add plugin deps to kibana.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Apr 16, 2020
1 parent 7303e71 commit 75fa8b3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 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 @@ -52,7 +52,6 @@ export function maps(kibana) {
};
},
embeddableFactories: ['plugins/maps/embeddable/map_embeddable_factory'],
home: ['plugins/maps/legacy_register_feature'],
styleSheetPaths: `${__dirname}/public/index.scss`,
savedObjectSchemas: {
'maps-telemetry': {
Expand Down
3 changes: 1 addition & 2 deletions x-pack/legacy/plugins/maps/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ import '../../../../plugins/maps/public/angular/services/gis_map_saved_object_lo
import './angular/map_controller';
import './routes';
// @ts-ignore
import { PluginInitializerContext } from 'kibana/public';
import { MapsPlugin } from './plugin';

export const plugin = (initializerContext: PluginInitializerContext) => {
export const plugin = () => {
return new MapsPlugin();
};

Expand Down
14 changes: 0 additions & 14 deletions x-pack/legacy/plugins/maps/public/legacy_register_feature.ts

This file was deleted.

3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/maps/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
} from '../../../../plugins/maps/public/plugin'; // eslint-disable-line @kbn/eslint/no-restricted-paths
import { HomePublicPluginSetup } from '../../../../../src/plugins/home/public';
import { LicensingPluginSetup } from '../../../../plugins/licensing/public';
import { featureCatalogueEntry } from '../../../../plugins/maps/public/feature_catalogue_entry';
import {
DataPublicPluginSetup,
DataPublicPluginStart,
Expand Down Expand Up @@ -64,8 +63,6 @@ export class MapsPlugin implements Plugin<MapsPluginSetup, MapsPluginStart> {
});

bindNpSetupCoreAndPlugins(core, np);

np.home.featureCatalogue.register(featureCatalogueEntry);
}

public start(core: CoreStart, plugins: MapsPluginStartDependencies) {
Expand Down
9 changes: 8 additions & 1 deletion x-pack/plugins/maps/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "8.0.0",
"kibanaVersion": "kibana",
"configPath": ["xpack", "maps"],
"requiredPlugins": ["inspector"],
"requiredPlugins": [
"inspector",
"home",
"data",
"fileUpload",
"uiActions",
"navigation"
],
"ui": true
}
8 changes: 7 additions & 1 deletion x-pack/plugins/maps/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
setVisualizations,
// @ts-ignore
} from './kibana_services';
import { featureCatalogueEntry } from './feature_catalogue_entry';

export interface MapsPluginSetupDependencies {
inspector: InspectorSetupContract;
Expand Down Expand Up @@ -92,8 +93,13 @@ export class MapsPlugin
MapsPluginStartDependencies
> {
public setup(core: CoreSetup, plugins: MapsPluginSetupDependencies) {
bindSetupCoreAndPlugins(core, plugins);

plugins.inspector.registerView(MapView);
plugins.home.featureCatalogue.register(featureCatalogueEntry);
}

public start(core: CoreStart, plugins: any) {}
public start(core: CoreStart, plugins: any) {
bindStartCoreAndPlugins(core, plugins);
}
}

0 comments on commit 75fa8b3

Please sign in to comment.