Skip to content

Commit

Permalink
Remove deprecated data plugin references (#175120)
Browse files Browse the repository at this point in the history
Resolves #124107
Related meta issue part #124063

## Summary

Replace usages of deprecated index pattern service and related types
  • Loading branch information
thomheymann authored Jan 23, 2024
1 parent 85be1f1 commit 450c384
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { firstValueFrom, from, of } from 'rxjs';
import { delay } from 'rxjs/operators';
import { DataView, DataViewsContract } from '@kbn/data-views-plugin/common';
import { fieldList, FieldSpec } from '@kbn/data-plugin/common';
import { DataView, DataViewsContract, fieldList, FieldSpec } from '@kbn/data-views-plugin/common';

type IndexPatternMock = Pick<
DataView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { useMemo } from 'react';
import { firstValueFrom, from, of } from 'rxjs';
import { delay } from 'rxjs/operators';
import { CoreStart } from '@kbn/core/public';
import { FieldSpec } from '@kbn/data-plugin/common';
import { FieldSpec } from '@kbn/data-views-plugin/common';
import { DataView, DataViewsContract } from '@kbn/data-views-plugin/public';
import { DataViewField } from '@kbn/data-views-plugin/common';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ import { useKibanaContextForPlugin } from './use_kibana';

export const useKibanaIndexPatternService = () => {
const {
services: {
data: { indexPatterns },
},
services: { dataViews },
} = useKibanaContextForPlugin();

return indexPatterns;
return dataViews;
};

interface IndexPatternDescriptor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FieldSpec } from '@kbn/data-plugin/common';
import { FieldSpec } from '@kbn/data-views-plugin/common';
import type { InfraPluginRequestHandlerContext } from '../../../types';
import { isNoSuchRemoteClusterMessage, NoSuchRemoteClusterError } from '../../sources/errors';
import { KibanaFramework } from '../framework/kibana_framework_adapter';
Expand Down

0 comments on commit 450c384

Please sign in to comment.