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

Move timeseries to vis_types folder #112228

Merged
merged 10 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ module.exports = {
* TSVB overrides
*/
{
files: ['src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}'],
files: ['src/plugins/vis_types/timeseries/**/*.{js,mjs,ts,tsx}'],
rules: {
'import/no-default-export': 'error',
},
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/src/plugins/vis_types/table/ @elastic/kibana-vis-editors
/src/plugins/vis_types/tagcloud/ @elastic/kibana-vis-editors
/src/plugins/vis_types/timelion/ @elastic/kibana-vis-editors
/src/plugins/vis_type_timeseries/ @elastic/kibana-vis-editors
/src/plugins/vis_types/timeseries/ @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
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"visTypeMetric": "src/plugins/vis_types/metric",
"visTypeTable": "src/plugins/vis_types/table",
"visTypeTagCloud": "src/plugins/vis_types/tagcloud",
"visTypeTimeseries": "src/plugins/vis_type_timeseries",
"visTypeTimeseries": "src/plugins/vis_types/timeseries",
"visTypeVega": "src/plugins/vis_types/vega",
"visTypeVislib": "src/plugins/vis_types/vislib",
"visTypeXy": "src/plugins/vis_types/xy",
Expand Down
320 changes: 160 additions & 160 deletions api_docs/data.json

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions api_docs/data_index_patterns.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions api_docs/deprecations_by_plugin.mdx

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions api_docs/vis_type_timeseries.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
") => data is ",
"SeriesData"
],
"path": "src/plugins/vis_type_timeseries/common/vis_data_utils.ts",
"path": "src/plugins/vis_types/timeseries/common/vis_data_utils.ts",
"deprecated": false,
"children": [
{
Expand All @@ -37,7 +37,7 @@
"signature": [
"TimeseriesVisData"
],
"path": "src/plugins/vis_type_timeseries/common/vis_data_utils.ts",
"path": "src/plugins/vis_types/timeseries/common/vis_data_utils.ts",
"deprecated": false,
"isRequired": true
}
Expand All @@ -58,7 +58,7 @@
") => data is ",
"TableData"
],
"path": "src/plugins/vis_type_timeseries/common/vis_data_utils.ts",
"path": "src/plugins/vis_types/timeseries/common/vis_data_utils.ts",
"deprecated": false,
"children": [
{
Expand All @@ -71,7 +71,7 @@
"signature": [
"TimeseriesVisData"
],
"path": "src/plugins/vis_type_timeseries/common/vis_data_utils.ts",
"path": "src/plugins/vis_types/timeseries/common/vis_data_utils.ts",
"deprecated": false,
"isRequired": true
}
Expand All @@ -95,7 +95,7 @@
" | ",
"TableData"
],
"path": "src/plugins/vis_type_timeseries/common/types/vis_data.ts",
"path": "src/plugins/vis_types/timeseries/common/types/vis_data.ts",
"deprecated": false,
"initialIsOpen": false
}
Expand All @@ -108,7 +108,7 @@
"tags": [],
"label": "VisTypeTimeseriesSetup",
"description": [],
"path": "src/plugins/vis_type_timeseries/server/plugin.ts",
"path": "src/plugins/vis_types/timeseries/server/plugin.ts",
"deprecated": false,
"children": [
{
Expand All @@ -133,7 +133,7 @@
"TimeseriesVisData",
">"
],
"path": "src/plugins/vis_type_timeseries/server/plugin.ts",
"path": "src/plugins/vis_types/timeseries/server/plugin.ts",
"deprecated": false,
"children": [
{
Expand All @@ -146,7 +146,7 @@
"signature": [
"DataRequestHandlerContext"
],
"path": "src/plugins/vis_type_timeseries/server/plugin.ts",
"path": "src/plugins/vis_types/timeseries/server/plugin.ts",
"deprecated": false,
"isRequired": true
},
Expand All @@ -167,7 +167,7 @@
},
"<unknown, unknown, unknown, any>"
],
"path": "src/plugins/vis_type_timeseries/server/plugin.ts",
"path": "src/plugins/vis_types/timeseries/server/plugin.ts",
"deprecated": false,
"isRequired": true
},
Expand All @@ -181,7 +181,7 @@
"signature": [
"any"
],
"path": "src/plugins/vis_type_timeseries/server/plugin.ts",
"path": "src/plugins/vis_types/timeseries/server/plugin.ts",
"deprecated": false,
"isRequired": true
}
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ The plugin exposes the static DefaultEditorController class to consume.
|Contains the timelion visualization and the timelion backend.


|{kib-repo}blob/{branch}/src/plugins/vis_type_timeseries[visTypeTimeseries]
|{kib-repo}blob/{branch}/src/plugins/vis_types/timeseries[visTypeTimeseries]
|WARNING: Missing README.


Expand Down
26 changes: 0 additions & 26 deletions src/plugins/vis_type_timeseries/tsconfig.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
getAggsByPredicate,
getAggsByType,
} from './agg_utils';
import { METRIC_TYPES } from '../../data/common';
import { METRIC_TYPES } from '../../../data/common';
import { TSVB_METRIC_TYPES } from './enums';
import type { Metric } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { i18n } from '@kbn/i18n';
import { filter } from 'lodash';
import { Assign } from 'utility-types';
import { METRIC_TYPES } from '../../data/common';
import { METRIC_TYPES } from '../../../data/common';
import { TSVB_METRIC_TYPES } from './enums';
import type { Metric, MetricType } from './types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { includes, startsWith } from 'lodash';
import { i18n } from '@kbn/i18n';
import { getMetricLabel } from './agg_utils';
import { extractFieldLabel } from './fields_utils';
import { METRIC_TYPES } from '../../data/common';
import { METRIC_TYPES } from '../../../data/common';
import { TSVB_METRIC_TYPES } from './enums';
import type { Metric, SanitizedFieldType } from './types';

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

import { toSanitizedFieldType } from './fields_utils';
import type { FieldSpec } from '../../data/common';
import type { FieldSpec } from '../../../data/common';

describe('fields_utils', () => {
describe('toSanitizedFieldType', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Side Public License, v 1.
*/

import { FieldSpec } from '../../data/common';
import { isNestedField } from '../../data/common';
import { FieldSpec } from '../../../data/common';
import { isNestedField } from '../../../data/common';
import { FetchedIndexPattern, SanitizedFieldType } from './types';
import { FieldNotFoundError } from './errors';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
fetchIndexPattern,
} from './index_patterns_utils';
import { Panel } from './types';
import { IndexPattern, IndexPatternsService } from '../../data/common';
import { IndexPattern, IndexPatternsService } from '../../../data/common';

describe('isStringTypeIndexPattern', () => {
test('should returns true on string-based index', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { uniq } from 'lodash';
import type { Panel, IndexPatternValue, FetchedIndexPattern } from '../common/types';
import { IndexPatternsService } from '../../data/common';
import { IndexPatternsService } from '../../../data/common';

export const isStringTypeIndexPattern = (
indexPatternValue: IndexPatternValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { Filter, IndexPattern, Query } from '../../../data/common';
import { Filter, IndexPattern, Query } from '../../../../data/common';
import { Panel } from './panel_model';

export { Metric, Series, Panel, MetricType } from './panel_model';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { METRIC_TYPES, Query } from '../../../data/common';
import { METRIC_TYPES, Query } from '../../../../data/common';
import { PANEL_TYPES, TOOLTIP_MODES, TSVB_METRIC_TYPES } from '../enums';
import { IndexPatternValue, Annotation } from './index';
import { ColorRules, BackgroundColorRules, BarColorRules, GaugeColorRules } from './color_rules';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { GTE_INTERVAL_RE } from './interval_regexp';
import { parseInterval, TimeRangeBounds } from '../../data/common';
import { parseInterval, TimeRangeBounds } from '../../../data/common';
import { ValidateIntervalError } from './errors';

export function validateInterval(bounds: TimeRangeBounds, interval: string, maxBuckets: number) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/src/plugins/vis_type_timeseries'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/src/plugins/vis_type_timeseries',
rootDir: '../../../..',
roots: ['<rootDir>/src/plugins/vis_types/timeseries'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/src/plugins/vis_types/timeseries',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/src/plugins/vis_type_timeseries/{common,public,server}/**/*.{js,ts,tsx}',
'<rootDir>/src/plugins/vis_types/timeseries/{common,public,server}/**/*.{js,ts,tsx}',
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
EuiFormRow,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';
import { getSupportedFieldsByMetricType } from '../lib/get_supported_fields_by_metric_type';
import { getDataStart } from '../../../services';
import { QueryBarWrapper } from '../query_bar_wrapper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { mountWithIntl } from '@kbn/test/jest';
import { FilterRatioAgg } from './filter_ratio';
import { FIELDS, METRIC, SERIES, PANEL } from '../../../test_utils';
import { EuiComboBox } from '@elastic/eui';
import { dataPluginMock } from '../../../../../data/public/mocks';
import { dataPluginMock } from '../../../../../../data/public/mocks';
import { setDataStart } from '../../../services';

jest.mock('../query_bar_wrapper', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Agg } from './agg';
import { FieldSelect } from './field_select';
import { FIELDS, METRIC, SERIES, PANEL } from '../../../test_utils';
import { setDataStart } from '../../../services';
import { dataPluginMock } from '../../../../../data/public/mocks';
import { dataPluginMock } from '../../../../../../data/public/mocks';

jest.mock('../query_bar_wrapper', () => ({
QueryBarWrapper: jest.fn(() => null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
EuiFormRow,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';
import { Percentiles, newPercentile } from './percentile_ui';
import { PercentileHdr } from './percentile_hdr';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { createNumberHandler } from '../../lib/create_number_handler';
import { AggRow } from '../agg_row';
import { PercentileRankValues } from './percentile_rank_values';

import { KBN_FIELD_TYPES } from '../../../../../../data/public';
import { KBN_FIELD_TYPES } from '../../../../../../../data/public';
import type { Metric, Panel, SanitizedFieldType, Series } from '../../../../../common/types';
import { TSVB_DEFAULT_COLOR } from '../../../../../common/constants';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';

const UNIT_OPTIONS = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
EuiSpacer,
} from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';

const RESTRICT_FIELDS = KBN_FIELD_TYPES.NUMBER;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
EuiFormRow,
} from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { KBN_FIELD_TYPES } from '../../../../../../../plugins/data/public';
import { PANEL_TYPES } from '../../../../common/enums';
import { getIndexPatternKey } from '../../../../common/index_patterns_utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { FormattedMessage } from '@kbn/i18n/react';

import { getDataStart } from '../../services';
import { KBN_FIELD_TYPES, Query } from '../../../../../plugins/data/public';
import { KBN_FIELD_TYPES, Query } from '../../../../../../plugins/data/public';

import { AddDeleteButtons } from './add_delete_buttons';
import { ColorPicker } from './color_picker';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { createTextHandler } from './lib/create_text_handler';
import { IndexPatternSelect } from './lib/index_pattern_select';
import { YesNo } from './yes_no';
import { LastValueModePopover } from './last_value_mode_popover';
import { KBN_FIELD_TYPES } from '../../../../data/public';
import { KBN_FIELD_TYPES } from '../../../../../data/public';
import { FormValidationContext } from '../contexts/form_validation_context';
import { isGteInterval, validateReInterval, isAutoInterval } from './lib/get_interval';
import { i18n } from '@kbn/i18n';
Expand All @@ -36,7 +36,7 @@ import { AUTO_INTERVAL } from '../../../common/constants';
import { isTimerangeModeEnabled } from '../lib/check_ui_restrictions';
import { VisDataContext } from '../contexts/vis_data_context';
import { getDataStart, getUISettings } from '../../services';
import { UI_SETTINGS } from '../../../../data/common';
import { UI_SETTINGS } from '../../../../../data/common';
import { fetchIndexPattern } from '../../../common/index_patterns_utils';

const RESTRICT_FIELDS = [KBN_FIELD_TYPES.DATE];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { METRIC_TYPES } from '../../../../../data/common';
import { METRIC_TYPES } from '../../../../../../data/common';
import { TSVB_METRIC_TYPES } from '../../../../common/enums';
import { checkIfNumericMetric } from './check_if_numeric_metric';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { getIndexPatternKey } from '../../../../common/index_patterns_utils';
import { TSVB_METRIC_TYPES } from '../../../../common/enums';
import { KBN_FIELD_TYPES } from '../../../../../data/public';
import { KBN_FIELD_TYPES } from '../../../../../../data/public';

import type { Metric, IndexPatternValue } from '../../../../common/types';
import type { VisFields } from '../../lib/fetch_fields';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { last, isEqual } from 'lodash';
import { DATA_FORMATTERS } from '../../../../common/enums';
import type { Series } from '../../../../common/types';
import type { FieldFormatMap } from '../../../../../data/common';
import type { FieldFormatMap } from '../../../../../../data/common';

export const checkIfSeriesHaveSameFormatters = (
seriesModel: Series[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { createFieldFormatter } from './create_field_formatter';
import { getFieldFormatsRegistry } from '../../../../../data/public/test_utils';
import { getFieldFormatsRegistry } from '../../../../../../data/public/test_utils';
import { setFieldFormats } from '../../../services';
import { FORMATS_UI_SETTINGS } from 'src/plugins/field_formats/common';
import type { CoreSetup } from 'kibana/public';
Expand Down
Loading