kibana/x-pack/plugins/lens/public/vis_type_alias.ts
Stratoula Kalafateli 5710f6763b
[Visualize] New visualization wizard (#79627)
* [Visualizations] New vis wizard

* Update functional tests

* Create oss plugins for maps and lens and unregister alias function

* Add new plugins to .i18nrc.json

* Add readme and codeowners to the new plugins

* update docs

* fix tests

* fix types

* fixes

* Update development docs

* fix oss functional tests

* Fix jest and x-pack functional tests

* Fix functional test

* changes on the layout

* Cleanup and responsiveness

* cleanup unecessary code

* add common folder to the new OSS plugins

* remove unecessary translations

* Update limits.yml file

* Fix basic label

* Add experimental badge on controls vis

* Nice improvements

* fixes

* Improving styles

* Making modal go full height on smaller screens

* Fixing sass lint warning

* fix lint error

* fix internationalization error

* PR fixes

* PR changes

* Use useCallback where possible

* Remove translations that need to be translated again

* Lazy Load wizard modal

* Remove legacyMapVisualizationWarning

* Import the OSS plugins constants from the plugins

* Export constant from lensOss

* Change the new oss plugins from OSS to Oss

* Add a new line to the kibana.json files of the new plugins

* New nit fix

* Fix spaces

* Change the texts for the first step of the modal

* Fix test

* Fixes some of the PR comments

* Add onClick funtionality to the entire aggregation based card

* Cards description changes, introduce a copyFromRoot method to solve the problem of when disabling the x-pack plugic, to also disable the oss

* Create new FTR for testing the functionality of the wizard when both maps and lens apps are disabled

* fix eslint error

* Change groupTitles and descriptions

* Change input vis description

* Remove the copyFromRoot from the signature of the ConfigDeprecationFactory and export it from the main entrypoint

* Make the disabled cards badge clickable

* Changes from code review

* Fix functional tests failures

* Rename groupTitle to titleInWizard to be more specific

* Change vega vis note

* minor design changes

* fix problem with plugins list docs

* Retrieve maps and lens landing page from docs service and add tracking url param

* Fix funtional test for the new dashboard flow

* Fix logic in alias registry for removing the discardOnRegister alias

* no need to remove the alias entry from the discardOnRegister array

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: miukimiu <elizabet.oliveira@elastic.co>
2020-11-06 18:03:44 +02:00

50 lines
1.6 KiB
TypeScript

/*
* 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 { VisTypeAlias } from 'src/plugins/visualizations/public';
import { getBasePath, getEditPath } from '../common';
export const getLensAliasConfig = (): VisTypeAlias => ({
aliasPath: getBasePath(),
aliasApp: 'lens',
name: 'lens',
promotion: true,
title: i18n.translate('xpack.lens.visTypeAlias.title', {
defaultMessage: 'Lens',
}),
description: i18n.translate('xpack.lens.visTypeAlias.description', {
defaultMessage:
'Create visualizations with our drag and drop editor. Switch between visualization types at any time.',
}),
note: i18n.translate('xpack.lens.visTypeAlias.note', {
defaultMessage: 'Recommended for most users.',
}),
icon: 'lensApp',
stage: 'production',
appExtensions: {
visualizations: {
docTypes: ['lens'],
searchFields: ['title^3'],
toListItem(savedObject) {
const { id, type, attributes } = savedObject;
const { title, description } = attributes as { title: string; description?: string };
return {
id,
title,
description,
editUrl: getEditPath(id),
editApp: 'lens',
icon: 'lensApp',
stage: 'production',
savedObjectType: type,
typeTitle: i18n.translate('xpack.lens.visTypeAlias.type', { defaultMessage: 'Lens' }),
};
},
},
},
});