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

[lens] Include link to lens from Visualize #40542

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/lens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Server } from 'hapi';
import { resolve } from 'path';
import { LegacyPluginInitializer } from 'src/legacy/types';
import mappings from './mappings.json';

import { PLUGIN_ID } from './common';

const NOT_INTERNATIONALIZED_PRODUCT_NAME = 'Lens Visualizations';
Expand All @@ -29,6 +28,7 @@ export const lens: LegacyPluginInitializer = kibana => {
},
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
mappings,
visTypes: ['plugins/lens/register_vis_type_alias'],
savedObjectsManagement: {
lens: {
defaultSearchField: 'title',
Expand Down
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/lens/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { render, unmountComponentAtNode } from 'react-dom';
import { IScope } from 'angular';
import chrome from 'ui/chrome';
import { appSetup, appStop } from './app_plugin';

import { PLUGIN_ID } from '../common';

// TODO: Convert this to the "new platform" way of doing UI
Expand Down
22 changes: 22 additions & 0 deletions x-pack/legacy/plugins/lens/public/register_vis_type_alias.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';
import { visualizations } from '../../../../../src/legacy/core_plugins/visualizations/public';

const NOT_INTERNATIONALIZED_PRODUCT_NAME = 'Lens Visualizations';

visualizations.types.visTypeAliasRegistry.add({
aliasUrl: '/app/lens/',
name: NOT_INTERNATIONALIZED_PRODUCT_NAME,
title: i18n.translate('xpack.lens.visTypeAlias.title', {
defaultMessage: 'Lens Visualizations',
}),
description: i18n.translate('xpack.lens.visTypeAlias.description', {
defaultMessage: `Lens is a simpler way to create basic visualizations`,
}),
icon: 'faceHappy',
});