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

[Visualize] New visualization wizard #79627

Merged
merged 88 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
caeda75
[Visualizations] New vis wizard
stratoula Oct 5, 2020
bfb8192
Update functional tests
stratoula Oct 5, 2020
4cf7f50
Create oss plugins for maps and lens and unregister alias function
stratoula Oct 6, 2020
9159543
merge with master and resolve conflicts
stratoula Oct 6, 2020
03cc038
Add new plugins to .i18nrc.json
stratoula Oct 6, 2020
4da28ce
Add readme and codeowners to the new plugins
stratoula Oct 6, 2020
eeecd68
update docs
stratoula Oct 6, 2020
ca38a1d
fix tests
stratoula Oct 6, 2020
0ecc5cb
fix types
stratoula Oct 6, 2020
2db1609
fixes
stratoula Oct 6, 2020
e11b4e5
Update development docs
stratoula Oct 6, 2020
e2770df
Merge with master and fix conflicts
stratoula Oct 6, 2020
67e8ae3
fix oss functional tests
stratoula Oct 6, 2020
cdea42f
Fix jest and x-pack functional tests
stratoula Oct 6, 2020
b3a7a6d
Fix functional test
stratoula Oct 7, 2020
920bc66
changes on the layout
stratoula Oct 7, 2020
4affc9b
Cleanup and responsiveness
stratoula Oct 7, 2020
b9dec37
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 7, 2020
ea2b4a3
cleanup unecessary code
stratoula Oct 8, 2020
5ba4431
Merge branch 'master' into visualization-wizard-new
stratoula Oct 8, 2020
676a982
add common folder to the new OSS plugins
stratoula Oct 8, 2020
c6e9f62
remove unecessary translations
stratoula Oct 8, 2020
e1f7a95
Update limits.yml file
stratoula Oct 8, 2020
03fe88d
Fix basic label
stratoula Oct 8, 2020
fd33edc
Add experimental badge on controls vis
stratoula Oct 8, 2020
4295550
merge with master and resolve conflicts
stratoula Oct 12, 2020
f6ebbbc
Nice improvements
stratoula Oct 12, 2020
d8362bf
fixes
stratoula Oct 12, 2020
6a5f9db
merge with master and resolve conflicts
stratoula Oct 13, 2020
b1d3194
merge with master and resolve conflicts
stratoula Oct 13, 2020
f03e9f1
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 14, 2020
0ef9285
Merge master and resolve conflicts
stratoula Oct 14, 2020
0e85809
Improving styles
miukimiu Oct 14, 2020
a179f55
Merge branch 'visualization-wizard-new' of https://github.com/stratou…
miukimiu Oct 14, 2020
c9c3bfd
Making modal go full height on smaller screens
miukimiu Oct 14, 2020
7a40ccc
Fixing sass lint warning
miukimiu Oct 14, 2020
f52dc35
fix lint error
stratoula Oct 14, 2020
a7ebe99
fix internationalization error
stratoula Oct 14, 2020
a8e8550
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 14, 2020
50060d6
merge with master and resolve codeowners conflict
stratoula Oct 15, 2020
6708db7
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 16, 2020
e86e10e
PR fixes
stratoula Oct 16, 2020
fada90c
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 19, 2020
5babb1b
PR changes
stratoula Oct 19, 2020
29b3b8c
Use useCallback where possible
stratoula Oct 19, 2020
a6be960
Remove translations that need to be translated again
stratoula Oct 19, 2020
232e279
Marge with master and resolve conflict
stratoula Oct 20, 2020
83775c9
Lazy Load wizard modal
stratoula Oct 20, 2020
e9578e4
Remove legacyMapVisualizationWarning
stratoula Oct 20, 2020
82d8a3e
Import the OSS plugins constants from the plugins
stratoula Oct 20, 2020
6343757
Export constant from lensOss
stratoula Oct 20, 2020
e8e92cf
Change the new oss plugins from OSS to Oss
stratoula Oct 20, 2020
26b6151
Add a new line to the kibana.json files of the new plugins
stratoula Oct 20, 2020
fb5ea1e
New nit fix
stratoula Oct 20, 2020
2b3b12d
Fix spaces
stratoula Oct 20, 2020
9957cf0
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 21, 2020
dcee108
Change the texts for the first step of the modal
stratoula Oct 21, 2020
d2e15cc
Fix test
stratoula Oct 21, 2020
8701e93
Fixes some of the PR comments
stratoula Oct 21, 2020
d230a34
Add onClick funtionality to the entire aggregation based card
stratoula Oct 21, 2020
34a7e72
Cards description changes, introduce a copyFromRoot method to solve t…
stratoula Oct 22, 2020
a2a359f
Create new FTR for testing the functionality of the wizard when both …
stratoula Oct 22, 2020
6e518f5
fix eslint error
stratoula Oct 22, 2020
35bcdea
Change groupTitles and descriptions
stratoula Oct 22, 2020
19fd7f5
Change input vis description
stratoula Oct 26, 2020
700102b
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 26, 2020
7a1aeaa
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 27, 2020
b96b023
Remove the copyFromRoot from the signature of the ConfigDeprecationFa…
stratoula Oct 27, 2020
d1583a6
Make the disabled cards badge clickable
stratoula Oct 29, 2020
a680d8e
Merge branch 'master' into visualization-wizard-new
kibanamachine Oct 29, 2020
fbd9b55
Changes from code review
stratoula Oct 29, 2020
8c115a1
Fix functional tests failures
stratoula Oct 29, 2020
4b5fc5c
Merge with master and resolve conflicts
stratoula Oct 29, 2020
dbc3b51
Rename groupTitle to titleInWizard to be more specific
stratoula Oct 29, 2020
46f3b1c
Change vega vis note
stratoula Oct 29, 2020
f1433ea
minor design changes
stratoula Oct 30, 2020
83355bd
merge with master and resolv conflicts
stratoula Oct 30, 2020
466e08b
Merge with master and resolve conflicts
stratoula Nov 2, 2020
3a9b4d1
Merge branch 'master' into visualization-wizard-new
kibanamachine Nov 2, 2020
cc2c53d
fix problem with plugins list docs
stratoula Nov 2, 2020
07d7a5e
Merge branch 'visualization-wizard-new' of https://github.com/stratou…
stratoula Nov 2, 2020
66694af
Merge branch 'master' into visualization-wizard-new
kibanamachine Nov 3, 2020
105cc93
Retrieve maps and lens landing page from docs service and add trackin…
stratoula Nov 3, 2020
1b7884c
Merge with master and resolve conflicts
stratoula Nov 3, 2020
eb150a8
Merge branch 'master' into visualization-wizard-new
kibanamachine Nov 5, 2020
00d92fe
Fix funtional test for the new dashboard flow
stratoula Nov 5, 2020
7dd304b
Fix logic in alias registry for removing the discardOnRegister alias
stratoula Nov 6, 2020
26b13ba
no need to remove the alias entry from the discardOnRegister array
stratoula Nov 6, 2020
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: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/src/plugins/advanced_settings/ @elastic/kibana-app
/src/plugins/charts/ @elastic/kibana-app
/src/plugins/discover/ @elastic/kibana-app
/src/plugins/lens_oss/ @elastic/kibana-app
/src/plugins/management/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/timelion/ @elastic/kibana-app
Expand Down Expand Up @@ -171,6 +172,7 @@
/x-pack/test/functional/apps/maps/ @elastic/kibana-gis
/x-pack/test/functional/es_archives/maps/ @elastic/kibana-gis
/x-pack/test/visual_regression/tests/maps/index.js @elastic/kibana-gis
/src/plugins/maps_oss @elastic/kibana-gis
#CC# /src/legacy/core_plugins/region_map @elastic/kibana-gis
#CC# /src/legacy/core_plugins/tile_map @elastic/kibana-gis
#CC# /src/plugins/maps_legacy/ @elastic/kibana-gis
Expand Down
2 changes: 2 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
"visTypeVislib": "src/plugins/vis_type_vislib",
"visTypeXy": "src/plugins/vis_type_xy",
"visualizations": "src/plugins/visualizations",
"lensOss": "src/plugins/lens_oss",
"mapsOss": "src/plugins/maps_oss",
"visualize": "src/plugins/visualize",
"apmOss": "src/plugins/apm_oss",
"usageCollection": "src/plugins/usage_collection"
Expand Down
1 change: 1 addition & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ files:
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_vega/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_xy/**/*.s+(a|c)ss'
- 'src/plugins/visualizations/public/wizard/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/**/*.s+(a|c)ss'
- 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss'
- 'x-pack/plugins/lens/**/*.s+(a|c)ss'
Expand Down
10 changes: 10 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|WARNING: Missing README.


|{kib-repo}blob/{branch}/src/plugins/lens_oss/README.md[lensOss]
|The lens_oss plugin registers the lens visualization on OSS.
It is registered as disabled. The x-pack plugin should unregister this.


|{kib-repo}blob/{branch}/src/plugins/management[management]
|WARNING: Missing README.

Expand All @@ -138,6 +143,11 @@ in Kibana, e.g. visualizations. It has the form of a flyout panel.
|WARNING: Missing README.


|{kib-repo}blob/{branch}/src/plugins/maps_oss/README.md[mapsOss]
|The maps_oss plugin registers the maps visualization on OSS.
It is registered as disabled. The x-pack plugin should unregister this.


|{kib-repo}blob/{branch}/src/plugins/navigation/README.md[navigation]
|The navigation plugins exports the TopNavMenu component.
It also provides a stateful version of it on the start contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
```typescript
readonly links: {
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export interface DocLinksStart
| --- | --- | --- |
| [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | <code>string</code> | |
| [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | <code>string</code> | |
| [links](./kibana-plugin-core-public.doclinksstart.links.md) | <code>{</code><br/><code> readonly dashboard: {</code><br/><code> readonly drilldowns: string;</code><br/><code> readonly drilldownsTriggerPicker: string;</code><br/><code> readonly urlDrilldownTemplateSyntax: string;</code><br/><code> readonly urlDrilldownVariables: string;</code><br/><code> };</code><br/><code> readonly filebeat: {</code><br/><code> readonly base: string;</code><br/><code> readonly installation: string;</code><br/><code> readonly configuration: string;</code><br/><code> readonly elasticsearchOutput: string;</code><br/><code> readonly startup: string;</code><br/><code> readonly exportedFields: string;</code><br/><code> };</code><br/><code> readonly auditbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly metricbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly heartbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly logstash: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly functionbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly winlogbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly aggs: {</code><br/><code> readonly date_histogram: string;</code><br/><code> readonly date_range: string;</code><br/><code> readonly filter: string;</code><br/><code> readonly filters: string;</code><br/><code> readonly geohash_grid: string;</code><br/><code> readonly histogram: string;</code><br/><code> readonly ip_range: string;</code><br/><code> readonly range: string;</code><br/><code> readonly significant_terms: string;</code><br/><code> readonly terms: string;</code><br/><code> readonly avg: string;</code><br/><code> readonly avg_bucket: string;</code><br/><code> readonly max_bucket: string;</code><br/><code> readonly min_bucket: string;</code><br/><code> readonly sum_bucket: string;</code><br/><code> readonly cardinality: string;</code><br/><code> readonly count: string;</code><br/><code> readonly cumulative_sum: string;</code><br/><code> readonly derivative: string;</code><br/><code> readonly geo_bounds: string;</code><br/><code> readonly geo_centroid: string;</code><br/><code> readonly max: string;</code><br/><code> readonly median: string;</code><br/><code> readonly min: string;</code><br/><code> readonly moving_avg: string;</code><br/><code> readonly percentile_ranks: string;</code><br/><code> readonly serial_diff: string;</code><br/><code> readonly std_dev: string;</code><br/><code> readonly sum: string;</code><br/><code> readonly top_hits: string;</code><br/><code> };</code><br/><code> readonly scriptedFields: {</code><br/><code> readonly scriptFields: string;</code><br/><code> readonly scriptAggs: string;</code><br/><code> readonly painless: string;</code><br/><code> readonly painlessApi: string;</code><br/><code> readonly painlessSyntax: string;</code><br/><code> readonly luceneExpressions: string;</code><br/><code> };</code><br/><code> readonly indexPatterns: {</code><br/><code> readonly loadingData: string;</code><br/><code> readonly introduction: string;</code><br/><code> };</code><br/><code> readonly addData: string;</code><br/><code> readonly kibana: string;</code><br/><code> readonly siem: {</code><br/><code> readonly guide: string;</code><br/><code> readonly gettingStarted: string;</code><br/><code> };</code><br/><code> readonly query: {</code><br/><code> readonly eql: string;</code><br/><code> readonly luceneQuerySyntax: string;</code><br/><code> readonly queryDsl: string;</code><br/><code> readonly kueryQuerySyntax: string;</code><br/><code> };</code><br/><code> readonly date: {</code><br/><code> readonly dateMath: string;</code><br/><code> };</code><br/><code> readonly management: Record&lt;string, string&gt;;</code><br/><code> readonly visualize: Record&lt;string, string&gt;;</code><br/><code> }</code> | |
| [links](./kibana-plugin-core-public.doclinksstart.links.md) | <code>{</code><br/><code> readonly dashboard: {</code><br/><code> readonly guide: string;</code><br/><code> readonly drilldowns: string;</code><br/><code> readonly drilldownsTriggerPicker: string;</code><br/><code> readonly urlDrilldownTemplateSyntax: string;</code><br/><code> readonly urlDrilldownVariables: string;</code><br/><code> };</code><br/><code> readonly filebeat: {</code><br/><code> readonly base: string;</code><br/><code> readonly installation: string;</code><br/><code> readonly configuration: string;</code><br/><code> readonly elasticsearchOutput: string;</code><br/><code> readonly startup: string;</code><br/><code> readonly exportedFields: string;</code><br/><code> };</code><br/><code> readonly auditbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly metricbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly heartbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly logstash: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly functionbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly winlogbeat: {</code><br/><code> readonly base: string;</code><br/><code> };</code><br/><code> readonly aggs: {</code><br/><code> readonly date_histogram: string;</code><br/><code> readonly date_range: string;</code><br/><code> readonly filter: string;</code><br/><code> readonly filters: string;</code><br/><code> readonly geohash_grid: string;</code><br/><code> readonly histogram: string;</code><br/><code> readonly ip_range: string;</code><br/><code> readonly range: string;</code><br/><code> readonly significant_terms: string;</code><br/><code> readonly terms: string;</code><br/><code> readonly avg: string;</code><br/><code> readonly avg_bucket: string;</code><br/><code> readonly max_bucket: string;</code><br/><code> readonly min_bucket: string;</code><br/><code> readonly sum_bucket: string;</code><br/><code> readonly cardinality: string;</code><br/><code> readonly count: string;</code><br/><code> readonly cumulative_sum: string;</code><br/><code> readonly derivative: string;</code><br/><code> readonly geo_bounds: string;</code><br/><code> readonly geo_centroid: string;</code><br/><code> readonly max: string;</code><br/><code> readonly median: string;</code><br/><code> readonly min: string;</code><br/><code> readonly moving_avg: string;</code><br/><code> readonly percentile_ranks: string;</code><br/><code> readonly serial_diff: string;</code><br/><code> readonly std_dev: string;</code><br/><code> readonly sum: string;</code><br/><code> readonly top_hits: string;</code><br/><code> };</code><br/><code> readonly scriptedFields: {</code><br/><code> readonly scriptFields: string;</code><br/><code> readonly scriptAggs: string;</code><br/><code> readonly painless: string;</code><br/><code> readonly painlessApi: string;</code><br/><code> readonly painlessSyntax: string;</code><br/><code> readonly luceneExpressions: string;</code><br/><code> };</code><br/><code> readonly indexPatterns: {</code><br/><code> readonly loadingData: string;</code><br/><code> readonly introduction: string;</code><br/><code> };</code><br/><code> readonly addData: string;</code><br/><code> readonly kibana: string;</code><br/><code> readonly siem: {</code><br/><code> readonly guide: string;</code><br/><code> readonly gettingStarted: string;</code><br/><code> };</code><br/><code> readonly query: {</code><br/><code> readonly eql: string;</code><br/><code> readonly luceneQuerySyntax: string;</code><br/><code> readonly queryDsl: string;</code><br/><code> readonly kueryQuerySyntax: string;</code><br/><code> };</code><br/><code> readonly date: {</code><br/><code> readonly dateMath: string;</code><br/><code> };</code><br/><code> readonly management: Record&lt;string, string&gt;;</code><br/><code> readonly visualize: Record&lt;string, string&gt;;</code><br/><code> }</code> | |

2 changes: 2 additions & 0 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pageLoadAssetSize:
kibanaReact: 161921
kibanaUtils: 198829
lens: 96624
lensOss: 19341
licenseManagement: 41817
licensing: 39008
lists: 183665
Expand All @@ -53,6 +54,7 @@ pageLoadAssetSize:
maps: 183610
mapsLegacy: 116817
mapsLegacyLicensing: 20214
mapsOss: 19284
ml: 82187
monitoring: 268612
navigation: 37269
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class DocLinksService {
ELASTIC_WEBSITE_URL,
links: {
dashboard: {
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html`,
drilldowns: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html`,
drilldownsTriggerPicker: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url-drilldown.html#trigger-picker`,
urlDrilldownTemplateSyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url-drilldown.html#templating`,
Expand Down Expand Up @@ -146,6 +147,7 @@ export interface DocLinksStart {
readonly ELASTIC_WEBSITE_URL: string;
readonly links: {
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
Expand Down
1 change: 1 addition & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ export interface DocLinksStart {
// (undocumented)
readonly links: {
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
*/

import { i18n } from '@kbn/i18n';

import { BaseVisTypeOptions } from 'src/plugins/visualizations/public';
import { VisGroups, BaseVisTypeOptions } from '../../visualizations/public';
import { createInputControlVisController } from './vis_controller';
import { getControlsTab } from './components/editor/controls_tab';
import { OptionsTab } from './components/editor/options_tab';
Expand All @@ -37,6 +36,7 @@ export function createInputControlVisTypeDefinition(
defaultMessage: 'Controls',
}),
icon: 'controlsHorizontal',
group: VisGroups.TOOLS,
description: i18n.translate('inputControl.register.controlsDescription', {
defaultMessage: 'Create interactive controls for easy dashboard manipulation.',
}),
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/lens_oss/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# lens_oss

The lens_oss plugin registers the lens visualization on OSS.
It is registered as disabled. The x-pack plugin should unregister this.

`visualizations.unregisterAlias('lensOss')`
22 changes: 22 additions & 0 deletions src/plugins/lens_oss/common/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export const APP_NAME = 'lens';
export const PLUGIN_ID_OSS = 'lensOss';
export const APP_PATH = '#/';
export const APP_ICON = 'lensApp';
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* under the License.
*/

export { TypeSelection } from './type_selection';
export * from './constants';
9 changes: 9 additions & 0 deletions src/plugins/lens_oss/kibana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "lensOss",
"version": "kibana",
"ui": true,
"requiredPlugins": [
"visualizations"
],
"extraPublicDirs": ["common/constants"]
}
21 changes: 21 additions & 0 deletions src/plugins/lens_oss/public/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { LensOSSPlugin } from './plugin';

export const plugin = () => new LensOSSPlugin();
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,18 @@
* under the License.
*/

import { EuiIcon, IconType } from '@elastic/eui';
import React from 'react';
import { CoreSetup } from 'kibana/public';
import { VisualizationsSetup } from 'src/plugins/visualizations/public';
import { getLensAliasConfig } from './vis_type_alias';

interface VisTypeIconProps {
icon?: IconType;
image?: string;
export interface LensPluginSetupDependencies {
visualizations: VisualizationsSetup;
}

/**
* This renders the icon for a specific visualization type.
* This currently checks the following:
* - If image is set, use that as the `src` of an image
* - Otherwise use the icon as an EuiIcon or the 'empty' icon if that's not set
*/
export const VisTypeIcon = ({ icon, image }: VisTypeIconProps) => {
return (
<React.Fragment>
{image && <img src={image} alt="" className="visNewVisDialog__typeImage" />}
{!image && <EuiIcon type={icon || 'empty'} size="l" color="secondary" />}
</React.Fragment>
);
};
export class LensOSSPlugin {
setup(core: CoreSetup, { visualizations }: LensPluginSetupDependencies) {
visualizations.registerAlias(getLensAliasConfig());
}

start() {}
}
Loading