Skip to content

Commit

Permalink
Migrate even more file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Feb 28, 2022
1 parent 6f59226 commit 27248ca
Show file tree
Hide file tree
Showing 90 changed files with 128 additions and 104 deletions.
3 changes: 1 addition & 2 deletions src/plugins/discover/public/__mocks__/index_pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
* Side Public License, v 1.
*/

import { IIndexPatternFieldList } from '../../../data/common';
import { DataView } from '../../../data/common';
import { IIndexPatternFieldList, DataView } from '../../../data_views/common';

const fields = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
* Side Public License, v 1.
*/

import { IIndexPatternFieldList } from '../../../data/common';
import { DataView } from '../../../data/common';
import { IIndexPatternFieldList, DataView } from '../../../data_views/common';

const fields = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { EuiText, EuiPageContent, EuiPage, EuiSpacer } from '@elastic/eui';
import { cloneDeep } from 'lodash';
import { DOC_TABLE_LEGACY, SEARCH_FIELDS_FROM_SOURCE } from '../../../common';
import { ContextErrorMessage } from './components/context_error_message';
import { DataView, DataViewField } from '../../../../data/common';
import { DataView, DataViewField } from '../../../../data_views/common';
import { LoadingStatus } from './services/context_query_state';
import { AppState, isEqualFilters } from './services/context_state';
import { useColumns } from '../../utils/use_data_grid_columns';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import React, { useState, Fragment, useMemo, useCallback } from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiHorizontalRule, EuiText } from '@elastic/eui';
import { CONTEXT_STEP_SETTING, DOC_HIDE_TIME_COLUMN_SETTING } from '../../../common';
import { DataView, SortDirection } from '../../../../data/common';
import type { DataView } from '../../../../data_views/common';
import { SortDirection } from '../../../../data/common';
import { LoadingStatus } from './services/context_query_state';
import { ActionBar } from './components/action_bar/action_bar';
import { DiscoverGrid } from '../../components/discover_grid/discover_grid';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { DataView, SortDirection } from '../../../../../data/common';
import { DataView } from '../../../../../data_views/common';
import { SortDirection } from '../../../../../data/common';
import { createSearchSourceStub } from './_stubs';
import { fetchAnchor, updateSearchSource } from './anchor';
import { indexPatternMock } from '../../../__mocks__/index_pattern';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/

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

import { ISearchSource, EsQuerySortValue, DataView } from '../../../../../data/common';
import { ISearchSource, EsQuerySortValue } from '../../../../../data/common';
import { DataView } from '../../../../../data_views/common';
import { EsHitRecord } from '../../types';

export async function fetchAnchor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import moment from 'moment';
import { get, last } from 'lodash';
import { DataView, SortDirection } from 'src/plugins/data/common';
import type { DataView } from 'src/plugins/data_views/common';
import { SortDirection } from 'src/plugins/data/common';
import { createContextSearchSourceStub } from './_stubs';
import { fetchSurroundingDocs, SurrDocType } from './context';
import { DataPublicPluginStart, Query } from '../../../../../data/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import moment from 'moment';
import { get, last } from 'lodash';
import { DataView, SortDirection } from 'src/plugins/data/common';
import { SortDirection } from 'src/plugins/data/common';
import type { DataView } from 'src/plugins/data_views/common';
import { createContextSearchSourceStub } from './_stubs';
import { DataPublicPluginStart, Query } from '../../../../../data/public';
import { fetchSurroundingDocs, SurrDocType } from './context';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Side Public License, v 1.
*/
import type { Filter } from '@kbn/es-query';
import { DataView, ISearchSource } from 'src/plugins/data/common';
import { DataView } from 'src/plugins/data_views/common';
import { ISearchSource } from 'src/plugins/data/common';
import { DataPublicPluginStart } from 'src/plugins/data/public';
import { reverseSortDir, SortDirection } from '../utils/sorting';
import { convertIsoToMillis, extractNanos } from '../utils/date_conversion';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import type { DataView } from 'src/plugins/data/common';
import type { DataView } from 'src/plugins/data_views/common';

export enum SortDirection {
asc = 'asc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { CONTEXT_TIE_BREAKER_FIELDS_SETTING } from '../../../../common';
import { fetchAnchor } from '../services/anchor';
import { fetchSurroundingDocs, SurrDocType } from '../services/context';
import { MarkdownSimple, toMountPoint, wrapWithTheme } from '../../../../../kibana_react/public';
import { DataView, SortDirection } from '../../../../../data/common';
import type { DataView } from '../../../../../data_views/common';
import { SortDirection } from '../../../../../data/common';
import {
ContextFetchState,
FailureReason,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import React from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { EuiCallOut, EuiLink, EuiLoadingSpinner, EuiPageContent, EuiPage } from '@elastic/eui';
import { DataView } from 'src/plugins/data/common';
import type { DataView } from 'src/plugins/data_views/common';
import { DocViewer } from '../../../services/doc_views/components/doc_viewer';
import { ElasticRequestState } from '../types';
import { useEsDocSearch } from '../../../utils/use_es_doc_search';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import { act } from 'react-dom/test-utils';
import { Subject, BehaviorSubject } from 'rxjs';
import { mountWithIntl } from '@kbn/test-jest-helpers';
import type { DataView } from '../../../../../../data/common';
import type { DataView } from '../../../../../../data_views/common';
import { setHeaderActionMenuMounter, setUiActions } from '../../../../kibana_services';
import { esHits } from '../../../../__mocks__/es_hits';
import { savedSearchMock } from '../../../../__mocks__/saved_search';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EuiSpacer,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import type { DataView } from '../../../../../../data/common';
import type { DataView } from '../../../../../../data_views/common';
import { HitsCounter } from '../hits_counter';
import { SavedSearch } from '../../../../services/saved_searches';
import { GetStateReturn } from '../../services/discover_state';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
import type { Filter } from '@kbn/es-query';
import { METRIC_TYPE, UiCounterMetricType } from '@kbn/analytics';
import { useDiscoverServices } from '../../../../utils/use_discover_services';
import { DataViewField, DataView, Query } from '../../../../../../data/common';
import type { Query } from '../../../../../../data/common';
import type { DataViewField, DataView } from '../../../../../../data_views/common';
import {
EmbeddableInput,
EmbeddableOutput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
SEARCH_FIELDS_FROM_SOURCE,
} from '../../../../../common';
import { useColumns } from '../../../../utils/use_data_grid_columns';
import { DataView } from '../../../../../../data/common';
import { DataView } from '../../../../../../data_views/common';
import { SavedSearch } from '../../../../services/saved_searches';
import { DataDocumentsMsg, DataDocuments$ } from '../../utils/use_saved_search';
import { AppState, GetStateReturn } from '../../services/discover_state';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { useDiscoverServices } from '../../../../utils/use_discover_services';
import { DiscoverNoResults } from '../no_results';
import { LoadingSpinner } from '../loading_spinner/loading_spinner';
import { generateFilters } from '../../../../../../data/public';
import { DataViewField } from '../../../../../../data/common';
import { DataViewField } from '../../../../../../data_views/common';
import { DiscoverSidebarResponsive } from '../sidebar';
import { DiscoverLayoutProps } from './types';
import { SEARCH_FIELDS_FROM_SOURCE, SHOW_FIELD_STATISTICS } from '../../../../../common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { findTestSubject } from '@elastic/eui/lib/test';
import { mountWithIntl } from '@kbn/test-jest-helpers';

import { DiscoverField } from './discover_field';
import { DataViewField } from '../../../../../../data/common';
import { DataViewField } from '../../../../../../data_views/common';
import { stubIndexPattern } from '../../../../../../data/common/stubs';
import { KibanaContextProvider } from '../../../../../../kibana_react/public';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import classNames from 'classnames';
import { FieldButton, FieldIcon } from '@kbn/react-field';
import { DiscoverFieldDetails } from './discover_field_details';
import { FieldDetails } from './types';
import { DataViewField, DataView } from '../../../../../../data/common';
import type { DataViewField, DataView } from '../../../../../../data_views/common';
import { getFieldTypeName } from './lib/get_field_type_name';
import { DiscoverFieldVisualize } from './discover_field_visualize';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { EuiText, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@e
import { i18n } from '@kbn/i18n';
import { StringFieldProgressBar } from './string_progress_bar';
import { Bucket } from './types';
import { DataViewField } from '../../../../../../data/common';
import { DataViewField } from '../../../../../../data_views/common';
import './discover_field_bucket.scss';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { findTestSubject } from '@elastic/eui/lib/test';
import { mountWithIntl } from '@kbn/test-jest-helpers';

import { DiscoverFieldDetails } from './discover_field_details';
import { DataViewField } from '../../../../../../data/common';
import { DataViewField } from '../../../../../../data_views/common';
import { stubIndexPattern } from '../../../../../../data/common/stubs';

describe('discover sidebar field details', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { EuiText, EuiSpacer, EuiLink } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { DiscoverFieldBucket } from './discover_field_bucket';
import { Bucket, FieldDetails } from './types';
import { DataViewField, DataView } from '../../../../../../data/common';
import { DataViewField, DataView } from '../../../../../../data_views/common';

interface DiscoverFieldDetailsProps {
field: DataViewField;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React, { useEffect, useState } from 'react';
import { METRIC_TYPE, UiCounterMetricType } from '@kbn/analytics';
import type { DataView, DataViewField } from 'src/plugins/data/common';
import type { DataView, DataViewField } from 'src/plugins/data_views/common';

import { triggerVisualizeActions, VisualizeInformation } from './lib/visualize_trigger_utils';
import type { FieldDetails } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ChangeIndexPattern } from './change_indexpattern';
import { SavedObject } from 'kibana/server';
import { DiscoverIndexPattern, DiscoverIndexPatternProps } from './discover_index_pattern';
import { EuiSelectable } from '@elastic/eui';
import { DataView, DataViewAttributes } from 'src/plugins/data/common';
import type { DataView, DataViewAttributes } from 'src/plugins/data_views/common';
import { indexPatternsMock } from '../../../../__mocks__/index_patterns';

const indexPattern = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React, { useState, useEffect } from 'react';
import { SavedObject } from 'kibana/public';
import { DataView, DataViewAttributes } from 'src/plugins/data/common';
import type { DataView, DataViewAttributes } from 'src/plugins/data_views/common';
import { IndexPatternRef } from './types';
import { ChangeIndexPattern } from './change_indexpattern';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { useDiscoverServices } from '../../../../utils/use_discover_services';
import { DataView } from '../../../../../../data/common';
import type { DataView } from '../../../../../../data_views/common';

export interface DiscoverIndexPatternManagementProps {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import realHits from '../../../../__fixtures__/real_hits.js';
import { mountWithIntl } from '@kbn/test-jest-helpers';
import React from 'react';
import { DiscoverSidebarProps } from './discover_sidebar';
import { flattenHit, DataViewAttributes } from '../../../../../../data/common';
import { flattenHit } from '../../../../../../data/common';
import { DataViewAttributes } from '../../../../../../data_views/common';
import { SavedObject } from '../../../../../../../core/types';
import { getDefaultFieldFilter } from './lib/field_filter';
import { DiscoverSidebarComponent as DiscoverSidebar } from './discover_sidebar';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import realHits from '../../../../__fixtures__/real_hits.js';
import { act } from 'react-dom/test-utils';
import { mountWithIntl } from '@kbn/test-jest-helpers';
import React from 'react';
import { flattenHit, DataViewAttributes } from '../../../../../../data/common';
import { DataViewAttributes } from '../../../../../../data_views/common';
import { flattenHit } from '../../../../../../data/common';
import { SavedObject } from '../../../../../../../core/types';
import {
DiscoverSidebarResponsive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ import {
} from '@elastic/eui';
import { useDiscoverServices } from '../../../../utils/use_discover_services';
import { DiscoverIndexPattern } from './discover_index_pattern';
import { DataViewField, DataView, DataViewAttributes } from '../../../../../../data/common';
import type {
DataViewField,
DataView,
DataViewAttributes,
} from '../../../../../../data_views/common';
import { SavedObject } from '../../../../../../../core/types';
import { getDefaultFieldFilter } from './lib/field_filter';
import { DiscoverSidebar } from './discover_sidebar';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import { keys, each, cloneDeep, clone, uniq, filter, map } from 'lodash';
// @ts-expect-error
import realHits from '../../../../../__fixtures__/real_hits.js';
import { flattenHit, DataView } from '../../../../../../../data/common';
import { flattenHit } from '../../../../../../../data/common';
import { DataView } from '../../../../../../../data_views/common';

// @ts-expect-error
import { fieldCalculator } from './field_calculator';
import { stubLogstashIndexPattern as indexPattern } from '../../../../../../../data/common/stubs';
import { stubLogstashDataView as indexPattern } from '../../../../../../../data_views/common/data_view.stub';

describe('fieldCalculator', function () {
it('should have a _countMissing that counts nulls & undefineds in an array', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { getDefaultFieldFilter, setFieldFilterProp, isFieldFiltered } from './field_filter';
import { DataViewField } from '../../../../../../../data/common';
import { DataViewField } from '../../../../../../../data_views/common';

describe('field_filter', function () {
it('getDefaultFieldFilter should return default filter state', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { DataViewField } from '../../../../../../../data/common';
import { DataViewField } from '../../../../../../../data_views/common';

export interface FieldFilterState {
missing: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// @ts-expect-error
import { fieldCalculator } from './field_calculator';
import { DataView, DataViewField } from '../../../../../../../data/common';
import { DataView, DataViewField } from '../../../../../../../data_views/common';
import { ElasticSearchHit } from '../../../../../types';

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

import { difference } from 'lodash';
import { DataView, DataViewField } from 'src/plugins/data/common';
import { DataView, DataViewField } from 'src/plugins/data_views/common';
import { isNestedFieldParent } from '../../../utils/nested_fields';

export function getIndexPatternFieldList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { groupFields } from './group_fields';
import { getDefaultFieldFilter } from './field_filter';
import { DataViewField } from '../../../../../../../data/common';
import { DataViewField } from '../../../../../../../data_views/common';

const fields = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { FieldFilterState, isFieldFiltered } from './field_filter';
import { getFieldSubtypeMulti, DataViewField } from '../../../../../../../data/common';
import { getFieldSubtypeMulti, DataViewField } from '../../../../../../../data_views/common';

interface GroupedFields {
selected: DataViewField[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import type { DataViewField } from 'src/plugins/data/common';
import type { DataViewField } from 'src/plugins/data_views/common';
import type { Action } from 'src/plugins/ui_actions/public';
import { getVisualizeInformation } from './visualize_trigger_utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
visualizeGeoFieldTrigger,
} from '../../../../../../../ui_actions/public';
import { getUiActions } from '../../../../../kibana_services';
import { DataViewField, KBN_FIELD_TYPES } from '../../../../../../../data/common';
import type { DataViewField } from '../../../../../../../data_views/common';
import { KBN_FIELD_TYPES } from '../../../../../../../data/common';
import { APP_ID } from '../../../../../../common';

function getTriggerConstant(type: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import { i18n } from '@kbn/i18n';
import type { DataView, ISearchSource } from 'src/plugins/data/common';
import type { ISearchSource } from 'src/plugins/data/common';
import type { DataView } from 'src/plugins/data_views/common';
import { showOpenSearchPanel } from './show_open_search_panel';
import { getSharingData, showPublicUrlSwitch } from '../../../../utils/get_sharing_data';
import { unhashUrl } from '../../../../../../kibana_utils/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import { i18n } from '@kbn/i18n';
import { SavedObjectSaveModal, showSaveModal } from '../../../../../../saved_objects/public';
import { SavedSearch, SaveSavedSearchOptions } from '../../../../services/saved_searches';
import { DataView } from '../../../../../../data/common';
import { DataView } from '../../../../../../data_views/common';
import { DiscoverServices } from '../../../../build_services';
import { GetStateReturn } from '../../services/discover_state';
import { setBreadcrumbsTitle } from '../../../../utils/breadcrumbs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { setBreadcrumbsTitle } from '../../utils/breadcrumbs';
import { addHelpMenuToAppChrome } from '../../components/help_menu/help_menu_util';
import { useDiscoverState } from './utils/use_discover_state';
import { useUrl } from './utils/use_url';
import type { DataViewAttributes, SavedObject } from '../../../../data/common';
import type { DataViewAttributes } from '../../../../data_views/common';
import type { SavedObject } from '../../../../data/common';
import { SavedSearch } from '../../services/saved_searches';
import { ElasticSearchHit } from '../../types';
import { useDiscoverServices } from '../../utils/use_discover_services';
Expand Down
Loading

0 comments on commit 27248ca

Please sign in to comment.