Skip to content

Commit

Permalink
[lens] Include link to lens from Visualize (#40542)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wylie Conlon authored Jul 9, 2019
1 parent 9c754fe commit e2dc494
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
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',
});

0 comments on commit e2dc494

Please sign in to comment.