diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/metric_select.js b/src/plugins/vis_type_timeseries/public/application/components/aggs/metric_select.js index 83ddc23648ad3..feda9fd239a66 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/metric_select.js +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/metric_select.js @@ -23,10 +23,10 @@ import { includes } from 'lodash'; import { injectI18n } from '@kbn/i18n/react'; import { EuiComboBox } from '@elastic/eui'; import { calculateSiblings } from '../lib/calculate_siblings'; -import { calculateLabel } from '../../../../../../plugins/vis_type_timeseries/common/calculate_label'; -import { basicAggs } from '../../../../../../plugins/vis_type_timeseries/common/basic_aggs'; -import { toPercentileNumber } from '../../../../../../plugins/vis_type_timeseries/common/to_percentile_number'; -import { METRIC_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/metric_types'; +import { calculateLabel } from '../../../../common/calculate_label'; +import { basicAggs } from '../../../../common/basic_aggs'; +import { toPercentileNumber } from '../../../../common/to_percentile_number'; +import { METRIC_TYPES } from '../../../../common/metric_types'; function createTypeFilter(restrict, exclude) { return (metric) => { diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/moving_average.js b/src/plugins/vis_type_timeseries/public/application/components/aggs/moving_average.js index fb945d2606bc8..48b6f6192a93c 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/moving_average.js +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/moving_average.js @@ -37,7 +37,7 @@ import { EuiFieldNumber, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { MODEL_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/model_options'; +import { MODEL_TYPES } from '../../../../common/model_options'; const DEFAULTS = { model_type: MODEL_TYPES.UNWEIGHTED, diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/top_hit.js b/src/plugins/vis_type_timeseries/public/application/components/aggs/top_hit.js index c63beee222b17..1969147efde9a 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/top_hit.js +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/top_hit.js @@ -36,7 +36,7 @@ import { } from '@elastic/eui'; import { injectI18n, FormattedMessage } from '@kbn/i18n/react'; import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public'; -import { PANEL_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/panel_types'; +import { PANEL_TYPES } from '../../../../common/panel_types'; const isFieldTypeEnabled = (fieldRestrictions, fieldType) => fieldRestrictions.length ? fieldRestrictions.includes(fieldType) : true; diff --git a/src/plugins/vis_type_timeseries/public/application/components/index_pattern.js b/src/plugins/vis_type_timeseries/public/application/components/index_pattern.js index 30c6d5b51d187..85f31285df69b 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/index_pattern.js +++ b/src/plugins/vis_type_timeseries/public/application/components/index_pattern.js @@ -42,11 +42,8 @@ import { AUTO_INTERVAL, } from './lib/get_interval'; import { i18n } from '@kbn/i18n'; -import { - TIME_RANGE_DATA_MODES, - TIME_RANGE_MODE_KEY, -} from '../../../../../plugins/vis_type_timeseries/common/timerange_data_modes'; -import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types'; +import { TIME_RANGE_DATA_MODES, TIME_RANGE_MODE_KEY } from '../../../common/timerange_data_modes'; +import { PANEL_TYPES } from '../../../common/panel_types'; import { isTimerangeModeEnabled } from '../lib/check_ui_restrictions'; import { VisDataContext } from '../contexts/vis_data_context'; diff --git a/src/plugins/vis_type_timeseries/public/application/components/lib/convert_series_to_vars.js b/src/plugins/vis_type_timeseries/public/application/components/lib/convert_series_to_vars.js index 0f64c570088d7..66783f5ef2715 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/lib/convert_series_to_vars.js +++ b/src/plugins/vis_type_timeseries/public/application/components/lib/convert_series_to_vars.js @@ -19,7 +19,7 @@ import { set } from '@elastic/safer-lodash-set'; import _ from 'lodash'; -import { getLastValue } from '../../../../../../plugins/vis_type_timeseries/common/get_last_value'; +import { getLastValue } from '../../../../common/get_last_value'; import { createTickFormatter } from './tick_formatter'; import { labelDateFormatter } from './label_date_formatter'; import moment from 'moment'; diff --git a/src/plugins/vis_type_timeseries/public/application/components/lib/get_interval.js b/src/plugins/vis_type_timeseries/public/application/components/lib/get_interval.js index 86361afca3b12..c1d484765f4cb 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/lib/get_interval.js +++ b/src/plugins/vis_type_timeseries/public/application/components/lib/get_interval.js @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; import { search } from '../../../../../../plugins/data/public'; const { parseEsInterval } = search.aggs; -import { GTE_INTERVAL_RE } from '../../../../../../plugins/vis_type_timeseries/common/interval_regexp'; +import { GTE_INTERVAL_RE } from '../../../../common/interval_regexp'; export const AUTO_INTERVAL = 'auto'; diff --git a/src/plugins/vis_type_timeseries/public/application/components/lib/get_supported_fields_by_metric_type.js b/src/plugins/vis_type_timeseries/public/application/components/lib/get_supported_fields_by_metric_type.js index 146e7a4bae15a..f8b6f19ac21a2 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/lib/get_supported_fields_by_metric_type.js +++ b/src/plugins/vis_type_timeseries/public/application/components/lib/get_supported_fields_by_metric_type.js @@ -18,7 +18,7 @@ */ import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public'; -import { METRIC_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/metric_types'; +import { METRIC_TYPES } from '../../../../common/metric_types'; export function getSupportedFieldsByMetricType(type) { switch (type) { diff --git a/src/plugins/vis_type_timeseries/public/application/components/lib/series_change_handler.js b/src/plugins/vis_type_timeseries/public/application/components/lib/series_change_handler.js index 0638c6e67f5ef..b6b99d7782762 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/lib/series_change_handler.js +++ b/src/plugins/vis_type_timeseries/public/application/components/lib/series_change_handler.js @@ -19,7 +19,7 @@ import _ from 'lodash'; import { newMetricAggFn } from './new_metric_agg_fn'; -import { isBasicAgg } from '../../../../../../plugins/vis_type_timeseries/common/agg_lookup'; +import { isBasicAgg } from '../../../../common/agg_lookup'; import { handleAdd, handleChange } from './collection_actions'; export const seriesChangeHandler = (props, items) => (doc) => { diff --git a/src/plugins/vis_type_timeseries/public/application/components/splits/terms.js b/src/plugins/vis_type_timeseries/public/application/components/splits/terms.js index a72c7598509a8..fe6c89ea6985b 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/splits/terms.js +++ b/src/plugins/vis_type_timeseries/public/application/components/splits/terms.js @@ -36,7 +36,7 @@ import { EuiFieldText, } from '@elastic/eui'; import { injectI18n, FormattedMessage } from '@kbn/i18n/react'; -import { FIELD_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/field_types'; +import { FIELD_TYPES } from '../../../../common/field_types'; import { STACKED_OPTIONS } from '../../visualizations/constants'; const DEFAULTS = { terms_direction: 'desc', terms_size: 10, terms_order_by: '_count' }; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js b/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js index 47b30f9ab2711..57adecd9d598b 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_editor.js @@ -28,7 +28,7 @@ import { VisPicker } from './vis_picker'; import { PanelConfig } from './panel_config'; import { createBrushHandler } from '../lib/create_brush_handler'; import { fetchFields } from '../lib/fetch_fields'; -import { extractIndexPatterns } from '../../../../../plugins/vis_type_timeseries/common/extract_index_patterns'; +import { extractIndexPatterns } from '../../../common/extract_index_patterns'; import { getSavedObjectsClient, getUISettings, getDataStart, getCoreStart } from '../../services'; import { CoreStartContextProvider } from '../contexts/query_input_bar_context'; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_editor_visualization.js b/src/plugins/vis_type_timeseries/public/application/components/vis_editor_visualization.js index 9c2b947bda08e..9742d817f7c0d 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_editor_visualization.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_editor_visualization.js @@ -28,7 +28,7 @@ import { isGteInterval, AUTO_INTERVAL, } from './lib/get_interval'; -import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types'; +import { PANEL_TYPES } from '../../../common/panel_types'; const MIN_CHART_HEIGHT = 300; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_picker.js b/src/plugins/vis_type_timeseries/public/application/components/vis_picker.js index c33ed02eadebd..79f5c7abca270 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_picker.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_picker.js @@ -21,7 +21,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import { EuiTabs, EuiTab } from '@elastic/eui'; import { injectI18n } from '@kbn/i18n/react'; -import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types'; +import { PANEL_TYPES } from '../../../common/panel_types'; function VisPickerItem(props) { const { label, type, selected } = props; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/gauge/vis.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/gauge/vis.js index 4c029f1c0d5b0..325e9c8372736 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/gauge/vis.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/gauge/vis.js @@ -23,7 +23,7 @@ import { visWithSplits } from '../../vis_with_splits'; import { createTickFormatter } from '../../lib/tick_formatter'; import _, { get, isUndefined, assign, includes } from 'lodash'; import { Gauge } from '../../../visualizations/views/gauge'; -import { getLastValue } from '../../../../../../../plugins/vis_type_timeseries/common/get_last_value'; +import { getLastValue } from '../../../../../common/get_last_value'; function getColors(props) { const { model, visData } = props; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/metric/vis.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/metric/vis.js index f37971e990c96..5fe7afe47df9b 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/metric/vis.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/metric/vis.js @@ -23,7 +23,7 @@ import { visWithSplits } from '../../vis_with_splits'; import { createTickFormatter } from '../../lib/tick_formatter'; import _, { get, isUndefined, assign, includes, pick } from 'lodash'; import { Metric } from '../../../visualizations/views/metric'; -import { getLastValue } from '../../../../../../../plugins/vis_type_timeseries/common/get_last_value'; +import { getLastValue } from '../../../../../common/get_last_value'; import { isBackgroundInverted } from '../../../lib/set_is_reversed'; function getColors(props) { diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/is_sortable.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/is_sortable.js index b44c94131348d..099dbe6639737 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/is_sortable.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/is_sortable.js @@ -17,7 +17,7 @@ * under the License. */ -import { basicAggs } from '../../../../../../../plugins/vis_type_timeseries/common/basic_aggs'; +import { basicAggs } from '../../../../../common/basic_aggs'; export function isSortable(metric) { return basicAggs.includes(metric.type); diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/vis.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/vis.js index 1341cf02202a0..92109e1a37426 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/vis.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/table/vis.js @@ -22,7 +22,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { RedirectAppLinks } from '../../../../../../kibana_react/public'; import { createTickFormatter } from '../../lib/tick_formatter'; -import { calculateLabel } from '../../../../../../../plugins/vis_type_timeseries/common/calculate_label'; +import { calculateLabel } from '../../../../../common/calculate_label'; import { isSortable } from './is_sortable'; import { EuiToolTip, EuiIcon } from '@elastic/eui'; import { replaceVars } from '../../lib/replace_vars'; @@ -30,7 +30,7 @@ import { fieldFormats } from '../../../../../../../plugins/data/public'; import { FormattedMessage } from '@kbn/i18n/react'; import { getFieldFormats, getCoreStart } from '../../../../services'; -import { METRIC_TYPES } from '../../../../../../../plugins/vis_type_timeseries/common/metric_types'; +import { METRIC_TYPES } from '../../../../../common/metric_types'; function getColor(rules, colorKey, value) { let color; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/series.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/series.js index 680c1c5e78ad4..039763efc78a2 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/series.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/timeseries/series.js @@ -35,7 +35,7 @@ import { import { Split } from '../../split'; import { createTextHandler } from '../../lib/create_text_handler'; import { FormattedMessage, injectI18n } from '@kbn/i18n/react'; -import { PANEL_TYPES } from '../../../../../../../plugins/vis_type_timeseries/common/panel_types'; +import { PANEL_TYPES } from '../../../../../common/panel_types'; const TimeseriesSeriesUI = injectI18n(function (props) { const { diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_types/top_n/vis.js b/src/plugins/vis_type_timeseries/public/application/components/vis_types/top_n/vis.js index e9f64c93d337f..1c2ebb8264ef3 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_types/top_n/vis.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_types/top_n/vis.js @@ -20,7 +20,7 @@ import { getCoreStart } from '../../../../services'; import { createTickFormatter } from '../../lib/tick_formatter'; import { TopN } from '../../../visualizations/views/top_n'; -import { getLastValue } from '../../../../../../../plugins/vis_type_timeseries/common/get_last_value'; +import { getLastValue } from '../../../../../common/get_last_value'; import { isBackgroundInverted } from '../../../lib/set_is_reversed'; import { replaceVars } from '../../lib/replace_vars'; import PropTypes from 'prop-types'; diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js b/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js index f583d087e60ef..27891cdbb3943 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js @@ -21,7 +21,7 @@ import React from 'react'; import { getDisplayName } from './lib/get_display_name'; import { labelDateFormatter } from './lib/label_date_formatter'; import { last, findIndex, first } from 'lodash'; -import { calculateLabel } from '../../../../../plugins/vis_type_timeseries/common/calculate_label'; +import { calculateLabel } from '../../../common/calculate_label'; export function visWithSplits(WrappedComponent) { function SplitVisComponent(props) { diff --git a/src/plugins/vis_type_timeseries/public/application/lib/check_ui_restrictions.js b/src/plugins/vis_type_timeseries/public/application/lib/check_ui_restrictions.js index 5d18c0a2f09cd..d77f2f327b30d 100644 --- a/src/plugins/vis_type_timeseries/public/application/lib/check_ui_restrictions.js +++ b/src/plugins/vis_type_timeseries/public/application/lib/check_ui_restrictions.js @@ -18,10 +18,7 @@ */ import { get } from 'lodash'; -import { - RESTRICTIONS_KEYS, - DEFAULT_UI_RESTRICTION, -} from '../../../../../plugins/vis_type_timeseries/common/ui_restrictions'; +import { RESTRICTIONS_KEYS, DEFAULT_UI_RESTRICTION } from '../../../common/ui_restrictions'; /** * Generic method for checking all types of the UI Restrictions diff --git a/src/plugins/vis_type_timeseries/public/application/lib/validate_interval.js b/src/plugins/vis_type_timeseries/public/application/lib/validate_interval.js index e8ddb4ceb5cba..9448a29787097 100644 --- a/src/plugins/vis_type_timeseries/public/application/lib/validate_interval.js +++ b/src/plugins/vis_type_timeseries/public/application/lib/validate_interval.js @@ -17,7 +17,7 @@ * under the License. */ -import { GTE_INTERVAL_RE } from '../../../../../plugins/vis_type_timeseries/common/interval_regexp'; +import { GTE_INTERVAL_RE } from '../../../common/interval_regexp'; import { i18n } from '@kbn/i18n'; import { search } from '../../../../../plugins/data/public'; const { parseInterval } = search.aggs; diff --git a/src/plugins/vis_type_timeseries/public/application/visualizations/views/gauge.js b/src/plugins/vis_type_timeseries/public/application/visualizations/views/gauge.js index 50a2042425438..0b9e191e4e29e 100644 --- a/src/plugins/vis_type_timeseries/public/application/visualizations/views/gauge.js +++ b/src/plugins/vis_type_timeseries/public/application/visualizations/views/gauge.js @@ -22,7 +22,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import classNames from 'classnames'; import { isBackgroundInverted, isBackgroundDark } from '../../lib/set_is_reversed'; -import { getLastValue } from '../../../../../../plugins/vis_type_timeseries/common/get_last_value'; +import { getLastValue } from '../../../../common/get_last_value'; import { getValueBy } from '../lib/get_value_by'; import { GaugeVis } from './gauge_vis'; import reactcss from 'reactcss'; diff --git a/src/plugins/vis_type_timeseries/public/application/visualizations/views/metric.js b/src/plugins/vis_type_timeseries/public/application/visualizations/views/metric.js index 4c286f61720ac..7356726e6262f 100644 --- a/src/plugins/vis_type_timeseries/public/application/visualizations/views/metric.js +++ b/src/plugins/vis_type_timeseries/public/application/visualizations/views/metric.js @@ -20,8 +20,9 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import _ from 'lodash'; -import { getLastValue } from '../../../../../../plugins/vis_type_timeseries/common/get_last_value'; import reactcss from 'reactcss'; + +import { getLastValue } from '../../../../common/get_last_value'; import { calculateCoordinates } from '../lib/calculate_coordinates'; export class Metric extends Component { diff --git a/src/plugins/vis_type_timeseries/public/application/visualizations/views/top_n.js b/src/plugins/vis_type_timeseries/public/application/visualizations/views/top_n.js index 136ac2506d392..9c6e497b92dab 100644 --- a/src/plugins/vis_type_timeseries/public/application/visualizations/views/top_n.js +++ b/src/plugins/vis_type_timeseries/public/application/visualizations/views/top_n.js @@ -19,7 +19,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { getLastValue } from '../../../../../../plugins/vis_type_timeseries/common/get_last_value'; +import { getLastValue } from '../../../../common/get_last_value'; import { labelDateFormatter } from '../../components/lib/label_date_formatter'; import reactcss from 'reactcss';