Skip to content

Commit

Permalink
Move to vis_types folder part 2 (#110574)
Browse files Browse the repository at this point in the history
* Move to vis_types folder part 2

* fix jest tests

* do some tests

* revert

* Test Tiago's fix

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
stratoula and kibanamachine authored Sep 3, 2021
1 parent 9d216cd commit 33c124b
Show file tree
Hide file tree
Showing 135 changed files with 216 additions and 209 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
/src/plugins/kibana_legacy/ @elastic/kibana-vis-editors
/src/plugins/timelion/ @elastic/kibana-vis-editors
/src/plugins/vis_default_editor/ @elastic/kibana-vis-editors
/src/plugins/vis_type_metric/ @elastic/kibana-vis-editors
/src/plugins/vis_types/metric/ @elastic/kibana-vis-editors
/src/plugins/vis_type_table/ @elastic/kibana-vis-editors
/src/plugins/vis_type_tagcloud/ @elastic/kibana-vis-editors
/src/plugins/vis_types/tagcloud/ @elastic/kibana-vis-editors
/src/plugins/vis_type_timelion/ @elastic/kibana-vis-editors
/src/plugins/vis_type_timeseries/ @elastic/kibana-vis-editors
/src/plugins/vis_type_vega/ @elastic/kibana-vis-editors
/src/plugins/vis_types/vega/ @elastic/kibana-vis-editors
/src/plugins/vis_types/vislib/ @elastic/kibana-vis-editors
/src/plugins/vis_types/xy/ @elastic/kibana-vis-editors
/src/plugins/vis_types/pie/ @elastic/kibana-vis-editors
Expand Down
6 changes: 3 additions & 3 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/plugins/vis_type_markdown",
"visTypeMetric": "src/plugins/vis_type_metric",
"visTypeMetric": "src/plugins/vis_types/metric",
"visTypeTable": "src/plugins/vis_type_table",
"visTypeTagCloud": "src/plugins/vis_type_tagcloud",
"visTypeTagCloud": "src/plugins/vis_types/tagcloud",
"visTypeTimeseries": "src/plugins/vis_type_timeseries",
"visTypeVega": "src/plugins/vis_type_vega",
"visTypeVega": "src/plugins/vis_types/vega",
"visTypeVislib": "src/plugins/vis_types/vislib",
"visTypeXy": "src/plugins/vis_types/xy",
"visTypePie": "src/plugins/vis_types/pie",
Expand Down
8 changes: 4 additions & 4 deletions api_docs/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@
"references": [
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/plugin.ts"
"path": "src/plugins/vis_types/vega/public/plugin.ts"
}
]
},
Expand Down Expand Up @@ -1423,15 +1423,15 @@
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/data_model/search_api.ts"
"path": "src/plugins/vis_types/vega/public/data_model/search_api.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/plugin.ts"
"path": "src/plugins/vis_types/vega/public/plugin.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/target/types/public/data_model/search_api.d.ts"
"path": "src/plugins/vis_types/vega/target/types/public/data_model/search_api.d.ts"
}
]
}
Expand Down
20 changes: 10 additions & 10 deletions api_docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -16157,11 +16157,11 @@
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "dashboard",
Expand Down Expand Up @@ -20282,15 +20282,15 @@
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
}
],
"children": [
Expand Down Expand Up @@ -22396,7 +22396,7 @@
},
{
"plugin": "visTypeMetric",
"path": "src/plugins/vis_type_metric/public/plugin.ts"
"path": "src/plugins/vis_types/metric/public/plugin.ts"
},
{
"plugin": "visTypeTable",
Expand Down Expand Up @@ -30417,11 +30417,11 @@
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "dashboard",
Expand Down Expand Up @@ -36898,11 +36898,11 @@
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "visTypeVega",
"path": "src/plugins/vis_type_vega/public/vega_request_handler.ts"
"path": "src/plugins/vis_types/vega/public/vega_request_handler.ts"
},
{
"plugin": "dashboard",
Expand Down
14 changes: 7 additions & 7 deletions api_docs/deprecations_by_plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex

| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
| <DocLink id="kibDataPluginApi" section="def-public.DataPublicPluginStart.fieldFormats" text="fieldFormats"/> | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_metric/public/plugin.ts#:~:text=fieldFormats) | - |
| <DocLink id="kibDataPluginApi" section="def-public.DataPublicPluginStart.fieldFormats" text="fieldFormats"/> | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/metric/public/plugin.ts#:~:text=fieldFormats) | - |



Expand Down Expand Up @@ -738,12 +738,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex

| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
| <DocLink id="kibDataPluginApi" section="def-public.esQuery" text="esQuery"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=esQuery) | 8.1 |
| <DocLink id="kibDataPluginApi" section="def-public.Filter" text="Filter"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 |
| <DocLink id="kibDataPluginApi" section="def-common.Filter" text="Filter"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 |
| <DocLink id="kibDataPluginApi" section="def-server.Filter" text="Filter"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 |
| <DocLink id="kibCorePluginApi" section="def-public.CoreSetup.injectedMetadata" text="injectedMetadata"/> | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/plugin.ts#:~:text=injectedMetadata) | - |
| <DocLink id="kibCorePluginApi" section="def-public.CoreStart.injectedMetadata" text="injectedMetadata"/> | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/public/plugin.ts#:~:text=injectedMetadata), [search_api.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_type_vega/target/types/public/data_model/search_api.d.ts#:~:text=injectedMetadata) | - |
| <DocLink id="kibDataPluginApi" section="def-public.esQuery" text="esQuery"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=esQuery), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=esQuery) | 8.1 |
| <DocLink id="kibDataPluginApi" section="def-public.Filter" text="Filter"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 |
| <DocLink id="kibDataPluginApi" section="def-common.Filter" text="Filter"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 |
| <DocLink id="kibDataPluginApi" section="def-server.Filter" text="Filter"/> | [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter), [vega_request_handler.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/vega_request_handler.ts#:~:text=Filter) | 8.1 |
| <DocLink id="kibCorePluginApi" section="def-public.CoreSetup.injectedMetadata" text="injectedMetadata"/> | [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata) | - |
| <DocLink id="kibCorePluginApi" section="def-public.CoreStart.injectedMetadata" text="injectedMetadata"/> | [search_api.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/data_model/search_api.ts#:~:text=injectedMetadata), [plugin.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/public/plugin.ts#:~:text=injectedMetadata), [search_api.d.ts](https://github.com/elastic/kibana/tree/master/src/plugins/vis_types/vega/target/types/public/data_model/search_api.d.ts#:~:text=injectedMetadata) | - |



Expand Down
4 changes: 2 additions & 2 deletions api_docs/vis_type_vega.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"tags": [],
"label": "VisTypeVegaPluginStart",
"description": [],
"path": "src/plugins/vis_type_vega/server/types.ts",
"path": "src/plugins/vis_types/vega/server/types.ts",
"deprecated": false,
"children": [],
"lifecycle": "start",
Expand All @@ -35,7 +35,7 @@
"tags": [],
"label": "VisTypeVegaPluginSetup",
"description": [],
"path": "src/plugins/vis_type_vega/server/types.ts",
"path": "src/plugins/vis_types/vega/server/types.ts",
"deprecated": false,
"children": [],
"lifecycle": "setup",
Expand Down
6 changes: 3 additions & 3 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|The markdown visualization that can be used to place text panels on dashboards.
|{kib-repo}blob/{branch}/src/plugins/vis_type_metric[visTypeMetric]
|{kib-repo}blob/{branch}/src/plugins/vis_types/metric[visTypeMetric]
|WARNING: Missing README.
Expand All @@ -298,7 +298,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|Contains the data table visualization, that allows presenting data in a simple table format.
|{kib-repo}blob/{branch}/src/plugins/vis_type_tagcloud[visTypeTagcloud]
|{kib-repo}blob/{branch}/src/plugins/vis_types/tagcloud[visTypeTagcloud]
|WARNING: Missing README.
Expand All @@ -310,7 +310,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|WARNING: Missing README.
|{kib-repo}blob/{branch}/src/plugins/vis_type_vega[visTypeVega]
|{kib-repo}blob/{branch}/src/plugins/vis_types/vega[visTypeVega]
|WARNING: Missing README.
Expand Down
20 changes: 0 additions & 20 deletions src/plugins/vis_type_metric/tsconfig.json

This file was deleted.

23 changes: 0 additions & 23 deletions src/plugins/vis_type_tagcloud/tsconfig.json

This file was deleted.

31 changes: 0 additions & 31 deletions src/plugins/vis_type_vega/tsconfig.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/src/plugins/vis_type_vega'],
rootDir: '../../../..',
roots: ['<rootDir>/src/plugins/vis_types/metric'],
};
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import React, { Component } from 'react';
import { isColorDark } from '@elastic/eui';
import { MetricVisValue } from './metric_vis_value';
import { Input } from '../metric_vis_fn';
import type { FieldFormatsContentType, IFieldFormat } from '../../../field_formats/common';
import { Datatable } from '../../../expressions/public';
import { getHeatmapColors } from '../../../charts/public';
import type { FieldFormatsContentType, IFieldFormat } from '../../../../field_formats/common';
import { Datatable } from '../../../../expressions/public';
import { getHeatmapColors } from '../../../../charts/public';
import { VisParams, MetricVisMetric } from '../types';
import { getFormatService } from '../services';
import { SchemaConfig } from '../../../visualizations/public';
import { Range } from '../../../expressions/public';
import { SchemaConfig } from '../../../../visualizations/public';
import { Range } from '../../../../expressions/public';

import './metric_vis.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
ColorSchemaOptions,
RangeOption,
PercentageModeOption,
} from '../../../vis_default_editor/public';
import { ColorMode, colorSchemas } from '../../../charts/public';
} from '../../../../vis_default_editor/public';
import { ColorMode, colorSchemas } from '../../../../charts/public';
import { MetricVisParam, VisParams } from '../types';

const metricColorMode = [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/

import { createMetricVisFn } from './metric_vis_fn';
import { functionWrapper } from '../../expressions/common/expression_functions/specs/tests/utils';
import { Datatable } from '../../expressions/common/expression_types/specs';
import { functionWrapper } from '../../../expressions/common/expression_functions/specs/tests/utils';
import { Datatable } from '../../../expressions/common/expression_types/specs';

describe('interpreter/functions#metric', () => {
const fn = functionWrapper(createMetricVisFn());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import {
Range,
Render,
Style,
} from '../../expressions/public';
} from '../../../expressions/public';
import { visType, DimensionsVisParam, VisParams } from './types';
import { prepareLogTable, Dimension } from '../../visualizations/public';
import { ColorSchemas, vislibColorMaps, ColorMode } from '../../charts/public';
import { prepareLogTable, Dimension } from '../../../visualizations/public';
import { ColorSchemas, vislibColorMaps, ColorMode } from '../../../charts/public';

export type Input = Datatable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import React, { lazy } from 'react';
import { render, unmountComponentAtNode } from 'react-dom';

import { VisualizationContainer } from '../../visualizations/public';
import { ExpressionRenderDefinition } from '../../expressions/common/expression_renderers';
import { VisualizationContainer } from '../../../visualizations/public';
import { ExpressionRenderDefinition } from '../../../expressions/common/expression_renderers';
import { MetricVisRenderValue } from './metric_vis_fn';
// @ts-ignore
const MetricVisComponent = lazy(() => import('./components/metric_vis_component'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import { i18n } from '@kbn/i18n';
import { MetricVisOptions } from './components/metric_vis_options';
import { ColorSchemas, ColorMode } from '../../charts/public';
import { VisTypeDefinition } from '../../visualizations/public';
import { AggGroupNames } from '../../data/public';
import { ColorSchemas, ColorMode } from '../../../charts/public';
import { VisTypeDefinition } from '../../../visualizations/public';
import { AggGroupNames } from '../../../data/public';
import { toExpressionAst } from './to_ast';
import { VisParams } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
*/

import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from 'kibana/public';
import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public';
import { VisualizationsSetup } from '../../visualizations/public';
import { Plugin as ExpressionsPublicPlugin } from '../../../expressions/public';
import { VisualizationsSetup } from '../../../visualizations/public';

import { createMetricVisFn } from './metric_vis_fn';
import { createMetricVisTypeDefinition } from './metric_vis_type';
import { ChartsPluginSetup } from '../../charts/public';
import { DataPublicPluginStart } from '../../data/public';
import { ChartsPluginSetup } from '../../../charts/public';
import { DataPublicPluginStart } from '../../../data/public';
import { setFormatService } from './services';
import { ConfigSchema } from '../config';
import { metricVisRenderer } from './metric_vis_renderer';
Expand Down
Loading

0 comments on commit 33c124b

Please sign in to comment.