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

Renaming vis_type_timeseries plugin folder to kebab-case #423

Closed
Show file tree
Hide file tree
Changes from all 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 @@ -699,7 +699,7 @@ module.exports = {
* TSVB overrides
*/
{
files: ['src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}'],
files: ['src/plugins/vis-type-timeseries/**/*.{js,mjs,ts,tsx}'],
rules: {
'import/no-default-export': 'error',
},
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"visTypeMetric": "src/plugins/vis_type_metric",
"visTypeTable": "src/plugins/vis_type_table",
"visTypeTagCloud": "src/plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/plugins/vis_type_timeseries",
"visTypeTimeseries": "src/plugins/vis-type-timeseries",
"visTypeVega": "src/plugins/vis_type_vega",
"visTypeVislib": "src/plugins/vis_type_vislib",
"visTypeXy": "src/plugins/vis_type_xy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
@import './vis_with_splits';

@import './aggs/index';
@import './panel_config/index';
@import './vis_types/index';
@import './panel-config/index';
@import './vis-types/index';
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { AggSelect } from './agg_select';
import { METRIC, SERIES } from '../../../test_utils';
import { METRIC, SERIES } from '../../../test-utils';
import { EuiComboBox } from '@elastic/eui';

describe('TSVB AggSelect', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { FilterRatioAgg } from './filter_ratio';
import { FIELDS, METRIC, SERIES, PANEL } from '../../../test_utils';
import { FIELDS, METRIC, SERIES, PANEL } from '../../../test-utils';
import { EuiComboBox } from '@elastic/eui';
import { dataPluginMock } from '../../../../../data/public/mocks';
import { setDataStart } from '../../../services';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import React from 'react';
import { mountWithIntl } from 'test_utils/enzyme_helpers';
import { Agg } from './agg';
import { FieldSelect } from './field_select';
import { FIELDS, METRIC, SERIES, PANEL } from '../../../test_utils';
import { FIELDS, METRIC, SERIES, PANEL } from '../../../test-utils';
import { setDataStart } from '../../../services';
import { dataPluginMock } from '../../../../../data/public/mocks';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import { includes } from 'lodash';
import { injectI18n } from '@osd/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 '../../../../../../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';

function createTypeFilter(restrict, exclude) {
return (metric) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
EuiFieldNumber,
} from '@elastic/eui';
import { i18n } from '@osd/i18n';
import { MODEL_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/model_options';
import { MODEL_TYPES } from '../../../../../../plugins/vis-type-timeseries/common/model_options';

const DEFAULTS = {
model_type: MODEL_TYPES.UNWEIGHTED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
} from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@osd/i18n/react';
import { OSD_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { PANEL_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/panel_types';
import { PANEL_TYPES } from '../../../../../../plugins/vis-type-timeseries/common/panel_types';

const isFieldTypeEnabled = (fieldRestrictions, fieldType) =>
fieldRestrictions.length ? fieldRestrictions.includes(fieldType) : true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { AddDeleteButtons } from './add_delete_buttons';
import { ColorPicker } from './color_picker';
import { FieldSelect } from './aggs/field_select';
import uuid from 'uuid';
import { IconSelect } from './icon_select/icon_select';
import { IconSelect } from './icon-select/icon_select';
import { YesNo } from './yes_no';
import { QueryBarWrapper } from './query_bar_wrapper';
import { getDefaultQueryLanguage } from './lib/get_default_query_language';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ import { i18n } from '@osd/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';
} from '../../../../../plugins/vis-type-timeseries/common/timerange_data_modes';
import { PANEL_TYPES } from '../../../../../plugins/vis-type-timeseries/common/panel_types';
import { isTimerangeModeEnabled } from '../lib/check_ui_restrictions';
import { VisDataContext } from '../contexts/vis_data_context';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { SeriesAgg } from '../aggs/series_agg';
import { SerialDiffAgg } from '../aggs/serial_diff';
import { PositiveOnlyAgg } from '../aggs/positive_only';
import { FilterRatioAgg } from '../aggs/filter_ratio';
import { PercentileRankAgg } from '../aggs/percentile_rank';
import { PercentileRankAgg } from '../aggs/percentile-rank';
import { Static } from '../aggs/static';
import { MathAgg } from '../aggs/math';
import { TopHitAgg } from '../aggs/top_hit';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 '../../../../../../plugins/vis-type-timeseries/common/get_last_value';
import { createTickFormatter } from './tick_formatter';
import moment from 'moment';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { i18n } from '@osd/i18n';
import { get } from 'lodash';
import { search } from '../../../../../../plugins/data/public';
const { parseOpenSearchInterval } = search.aggs;
import { GTE_INTERVAL_RE } from '../../../../../../plugins/vis_type_timeseries/common/interval_regexp';
import { GTE_INTERVAL_RE } from '../../../../../../plugins/vis-type-timeseries/common/interval_regexp';

export const AUTO_INTERVAL = 'auto';

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

import { OSD_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { METRIC_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/metric_types';
import { METRIC_TYPES } from '../../../../../../plugins/vis-type-timeseries/common/metric_types';

export function getSupportedFieldsByMetricType(type) {
switch (type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import _ from 'lodash';
import { newMetricAggFn } from './new_metric_agg_fn';
import { isBasicAgg } from '../../../../../../plugins/vis_type_timeseries/common/agg_lookup';
import { isBasicAgg } from '../../../../../../plugins/vis-type-timeseries/common/agg_lookup';
import { handleAdd, handleChange } from './collection_actions';

export const seriesChangeHandler = (props, items) => (doc) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
*/
import PropTypes from 'prop-types';
import React, { useState, useEffect } from 'react';
import { TimeseriesPanelConfig as timeseries } from './panel_config/timeseries';
import { MetricPanelConfig as metric } from './panel_config/metric';
import { TopNPanelConfig as topN } from './panel_config/top_n';
import { TablePanelConfig as table } from './panel_config/table';
import { GaugePanelConfig as gauge } from './panel_config/gauge';
import { MarkdownPanelConfig as markdown } from './panel_config/markdown';
import { TimeseriesPanelConfig as timeseries } from './panel-config/timeseries';
import { MetricPanelConfig as metric } from './panel-config/metric';
import { TopNPanelConfig as topN } from './panel-config/top_n';
import { TablePanelConfig as table } from './panel-config/table';
import { GaugePanelConfig as gauge } from './panel-config/gauge';
import { MarkdownPanelConfig as markdown } from './panel-config/markdown';
import { FormattedMessage } from '@osd/i18n/react';

import { FormValidationContext } from '../contexts/form_validation_context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { assign, get } from 'lodash';

import { TimeseriesSeries as timeseries } from './vis_types/timeseries/series';
import { MetricSeries as metric } from './vis_types/metric/series';
import { TopNSeries as topN } from './vis_types/top_n/series';
import { TableSeries as table } from './vis_types/table/series';
import { GaugeSeries as gauge } from './vis_types/gauge/series';
import { MarkdownSeries as markdown } from './vis_types/markdown/series';
import { TimeseriesSeries as timeseries } from './vis-types/timeseries/series';
import { MetricSeries as metric } from './vis-types/metric/series';
import { TopNSeries as topN } from './vis-types/top-n/series';
import { TableSeries as table } from './vis-types/table/series';
import { GaugeSeries as gauge } from './vis-types/gauge/series';
import { MarkdownSeries as markdown } from './vis-types/markdown/series';
import { FormattedMessage } from '@osd/i18n/react';
import { VisDataContext } from '../contexts/vis_data_context';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
EuiFieldText,
} from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@osd/i18n/react';
import { FIELD_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/field_types';
import { FIELD_TYPES } from '../../../../../../plugins/vis-type-timeseries/common/field_types';
import { STACKED_OPTIONS } from '../../visualizations/constants';

const DEFAULTS = { terms_direction: 'desc', terms_size: 10, terms_order_by: '_count' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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 '../../../../../../../plugins/vis-type-timeseries/common/get_last_value';

function getColors(props) {
const { model, visData } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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 '../../../../../../../plugins/vis-type-timeseries/common/get_last_value';
import { isBackgroundInverted } from '../../../lib/set_is_reversed';

function getColors(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* GitHub history for details.
*/

import { basicAggs } from '../../../../../../../plugins/vis_type_timeseries/common/basic_aggs';
import { basicAggs } from '../../../../../../../plugins/vis-type-timeseries/common/basic_aggs';

export function isSortable(metric) {
return basicAggs.includes(metric.type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { RedirectAppLinks } from '../../../../../../opensearch_dashboards_react/public';
import { createTickFormatter } from '../../lib/tick_formatter';
import { calculateLabel } from '../../../../../../../plugins/vis_type_timeseries/common/calculate_label';
import { calculateLabel } from '../../../../../../../plugins/vis-type-timeseries/common/calculate_label';
import { isSortable } from './is_sortable';
import { EuiToolTip, EuiIcon } from '@elastic/eui';
import { replaceVars } from '../../lib/replace_vars';
import { fieldFormats } from '../../../../../../../plugins/data/public';
import { FormattedMessage } from '@osd/i18n/react';
import { getFieldFormats, getCoreStart } from '../../../../services';

import { METRIC_TYPES } from '../../../../../../../plugins/vis_type_timeseries/common/metric_types';
import { METRIC_TYPES } from '../../../../../../../plugins/vis-type-timeseries/common/metric_types';

function getColor(rules, colorKey, value) {
let color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
import { Split } from '../../split';
import { createTextHandler } from '../../lib/create_text_handler';
import { FormattedMessage, injectI18n } from '@osd/i18n/react';
import { PANEL_TYPES } from '../../../../../../../plugins/vis_type_timeseries/common/panel_types';
import { PANEL_TYPES } from '../../../../../../../plugins/vis-type-timeseries/common/panel_types';

const TimeseriesSeriesUI = injectI18n(function (props) {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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 '../../../../../../../plugins/vis-type-timeseries/common/get_last_value';
import { isBackgroundInverted } from '../../../lib/set_is_reversed';
import { replaceVars } from '../../lib/replace_vars';
import PropTypes from 'prop-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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 '../../../../../plugins/vis-type-timeseries/common/extract_index_patterns';
import { getSavedObjectsClient, getUISettings, getDataStart, getCoreStart } from '../../services';

import { CoreStartContextProvider } from '../contexts/query_input_bar_context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
isGteInterval,
AUTO_INTERVAL,
} from './lib/get_interval';
import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types';
import { PANEL_TYPES } from '../../../../../plugins/vis-type-timeseries/common/panel_types';

const MIN_CHART_HEIGHT = 300;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import { EuiTabs, EuiTab } from '@elastic/eui';
import { injectI18n } from '@osd/i18n/react';
import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types';
import { PANEL_TYPES } from '../../../../../plugins/vis-type-timeseries/common/panel_types';

function VisPickerItem(props) {
const { label, type, selected } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import React from 'react';
import { getDisplayName } from './lib/get_display_name';
import { last, findIndex, first } from 'lodash';
import { calculateLabel } from '../../../../../plugins/vis_type_timeseries/common/calculate_label';
import { calculateLabel } from '../../../../../plugins/vis-type-timeseries/common/calculate_label';

export function visWithSplits(WrappedComponent) {
function SplitVisComponent(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import PropTypes from 'prop-types';
import React from 'react';
import _ from 'lodash';

import { TimeseriesVisualization } from './vis_types/timeseries/vis';
import { metric } from './vis_types/metric/vis';
import { TopNVisualization as topN } from './vis_types/top_n/vis';
import { TableVis as table } from './vis_types/table/vis';
import { gauge } from './vis_types/gauge/vis';
import { MarkdownVisualization as markdown } from './vis_types/markdown/vis';
import { TimeseriesVisualization } from './vis-types/timeseries/vis';
import { metric } from './vis-types/metric/vis';
import { TopNVisualization as topN } from './vis-types/top-n/vis';
import { TableVis as table } from './vis-types/table/vis';
import { gauge } from './vis-types/gauge/vis';
import { MarkdownVisualization as markdown } from './vis-types/markdown/vis';
import { ErrorComponent } from './error';
import { NoDataComponent } from './no_data';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { get } from 'lodash';
import {
RESTRICTIONS_KEYS,
DEFAULT_UI_RESTRICTION,
} from '../../../../../plugins/vis_type_timeseries/common/ui_restrictions';
} from '../../../../../plugins/vis-type-timeseries/common/ui_restrictions';

/**
* Generic method for checking all types of the UI Restrictions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* GitHub history for details.
*/

import { GTE_INTERVAL_RE } from '../../../../../plugins/vis_type_timeseries/common/interval_regexp';
import { GTE_INTERVAL_RE } from '../../../../../plugins/vis-type-timeseries/common/interval_regexp';
import { i18n } from '@osd/i18n';
import { search } from '../../../../../plugins/data/public';
const { parseInterval } = search.aggs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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 '../../../../../../plugins/vis-type-timeseries/common/get_last_value';
import { getValueBy } from '../lib/get_value_by';
import { GaugeVis } from './gauge_vis';
import reactcss from 'reactcss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
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 { getLastValue } from '../../../../../../plugins/vis-type-timeseries/common/get_last_value';
import reactcss from 'reactcss';
import { calculateCoordinates } from '../lib/calculate_coordinates';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 '../../../../../../plugins/vis-type-timeseries/common/get_last_value';
import reactcss from 'reactcss';

const RENDER_MODES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export const config: PluginConfigDescriptor<VisTypeTimeseriesConfig> = {
schema: configSchema,
};

export { ValidationTelemetryServiceSetup } from './validation_telemetry';
export { ValidationTelemetryServiceSetup } from './validation-telemetry';

export {
AbstractSearchStrategy,
ReqFacade,
} from './lib/search_strategies/strategies/abstract_search_strategy';
} from './lib/search-strategies/strategies/abstract_search_strategy';
// @ts-ignore
export { DefaultSearchCapabilities } from './lib/search_strategies/default_search_capabilities';
export { DefaultSearchCapabilities } from './lib/search-strategies/default_search_capabilities';

export function plugin(initializerContext: PluginInitializerContext) {
return new VisTypeTimeseriesPlugin(initializerContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
IndexPatternFieldDescriptor,
IndexPatternsFetcher,
} from '../../../data/server';
import { ReqFacade } from './search_strategies/strategies/abstract_search_strategy';
import { ReqFacade } from './search-strategies/strategies/abstract_search_strategy';

export async function getFields(
requestContext: RequestHandlerContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import { FakeRequest, RequestHandlerContext } from 'opensearch-dashboards/server';
import _ from 'lodash';
import { first, map } from 'rxjs/operators';
import { getPanelData } from './vis_data/get_panel_data';
import { getPanelData } from './vis-data/get_panel_data';
import { Framework } from '../plugin';
import { ReqFacade } from './search_strategies/strategies/abstract_search_strategy';
import { ReqFacade } from './search-strategies/strategies/abstract_search_strategy';

interface GetVisDataResponse {
[key: string]: GetVisDataPanel;
Expand Down
Loading