Skip to content
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

removing references to visTypes uiExports #58337

Merged
merged 11 commits into from
Mar 2, 2020
2 changes: 0 additions & 2 deletions src/legacy/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import { npSetup } from 'ui/new_platform';

// import the uiExports that we want to "use"
import 'uiExports/home';
import 'uiExports/visTypes';

import 'uiExports/visualize';
import 'uiExports/savedObjectTypes';
import 'uiExports/fieldFormatEditors';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import 'ui/autoload/all';
// Used to run esaggs queries
import 'uiExports/fieldFormats';
import 'uiExports/search';
import 'uiExports/visRequestHandlers';
import 'uiExports/visResponseHandlers';
// Used for kibana_context function

import 'uiExports/savedObjectTypes';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
export default function(kibana) {
return new kibana.Plugin({
uiExports: {
visTypes: ['plugins/kbn_tp_custom_visualizations/self_changing_vis/self_changing_vis'],
hacks: ['plugins/kbn_tp_custom_visualizations/self_changing_vis/self_changing_vis'],
},
});
}
3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/canvas/public/legacy_start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
// Import the uiExports that the application uses
// These will go away as these plugins are converted to NP
import 'ui/autoload/all';
import 'uiExports/visTypes';
import 'uiExports/visResponseHandlers';
import 'uiExports/visRequestHandlers';
import 'uiExports/savedObjectTypes';
import 'uiExports/spyModes';
import 'uiExports/embeddableFactories';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import { uiModules } from 'ui/modules';

// import the uiExports that we want to "use"
import 'uiExports/contextMenuActions';
import 'uiExports/visTypes';
import 'uiExports/visResponseHandlers';
import 'uiExports/visRequestHandlers';

import 'uiExports/inspectorViews';
import 'uiExports/interpreter';
import 'uiExports/savedObjectTypes';
Expand Down
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/lens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const lens: LegacyPluginInitializer = kibana => {
embeddableFactories: [`plugins/${PLUGIN_ID}/legacy`],
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
mappings,
visTypes: ['plugins/lens/register_vis_type_alias'],
savedObjectsManagement: {
lens: {
defaultSearchField: 'title',
Expand Down
4 changes: 4 additions & 0 deletions x-pack/legacy/plugins/lens/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import {
import { FormatFactory } from './legacy_imports';
import { IEmbeddableSetup, IEmbeddableStart } from '../../../../../src/plugins/embeddable/public';
import { EditorFrameStart } from './types';
import { setup as visualizations } from '../../../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this import to legacy.ts and pass it in via the setup call to keep the shim clean.

import { getLensAliasConfig } from './vis_type_alias';

export interface LensPluginSetupDependencies {
kibanaLegacy: KibanaLegacySetup;
Expand Down Expand Up @@ -100,6 +102,8 @@ export class LensPlugin {
this.datatableVisualization.setup(core, dependencies);
this.metricVisualization.setup(core, dependencies);

visualizations.types.registerAlias(getLensAliasConfig());

kibanaLegacy.registerLegacyApp({
id: 'lens',
title: NOT_INTERNATIONALIZED_PRODUCT_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/

import { i18n } from '@kbn/i18n';
import { setup as visualizations } from '../../../../../src/legacy/core_plugins/visualizations/public/np_ready/public/legacy';
import { getBasePath, getEditPath } from '../../../../plugins/lens/common';
import { VisTypeAlias } from '../../../../../src/legacy/core_plugins/visualizations/public/np_ready/public/vis_types';

visualizations.types.registerAlias({
export const getLensAliasConfig = (): VisTypeAlias => ({
aliasUrl: getBasePath(),
name: 'lens',
promotion: {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/maps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function maps(kibana) {
},
mappings,
migrations,
visTypes: ['plugins/maps/register_vis_type_alias'],
hacks: ['plugins/maps/register_vis_type_alias'],
},
config(Joi) {
return Joi.object({
Expand Down