Skip to content

Commit

Permalink
Move inspector init back to start method. Remove old license check file
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Mar 4, 2020
1 parent 990484a commit 8af0e07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 45 deletions.
38 changes: 0 additions & 38 deletions x-pack/legacy/plugins/maps/check_license.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getQueryableUniqueIndexPatternIds } from '../selectors/map_selectors';
import { getInitialLayers } from '../angular/get_initial_layers';
import { mergeInputWithSavedMap } from './merge_input_with_saved_map';
import '../angular/services/gis_map_saved_object_loader';
import { bindCoreAndPlugins } from '../plugin';
import { bindSetupCoreAndPlugins } from '../plugin';
import { npSetup } from 'ui/new_platform';

export class MapEmbeddableFactory extends EmbeddableFactory {
Expand All @@ -39,7 +39,7 @@ export class MapEmbeddableFactory extends EmbeddableFactory {
getIconForSavedObject: () => APP_ICON,
},
});
bindCoreAndPlugins(npSetup.core, npSetup.plugins);
bindSetupCoreAndPlugins(npSetup.core, npSetup.plugins);
}
isEditable() {
return capabilities.get().maps.save;
Expand Down
11 changes: 6 additions & 5 deletions x-pack/legacy/plugins/maps/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ interface MapsPluginSetupDependencies {
};
}

export const bindCoreAndPlugins = (core, plugins) => {
const { licensing, inspector } = plugins;
setInspector(inspector);
export const bindSetupCoreAndPlugins = (core, plugins) => {
const { licensing } = plugins;
if (licensing) {
licensing.license$.subscribe(({ uid }) => setLicenseId(uid));
}
Expand All @@ -48,10 +47,12 @@ export class MapsPlugin implements Plugin<MapsPluginSetup, MapsPluginStart> {
return reactDirective(wrapInI18nContext(MapListing));
});

bindCoreAndPlugins(core, np);
bindSetupCoreAndPlugins(core, np);

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

public start(core: CoreStart, plugins: any) {}
public start(core: CoreStart, plugins: any) {
setInspector(plugins.np.inspector);
}
}

0 comments on commit 8af0e07

Please sign in to comment.