Skip to content

Commit

Permalink
[ML] Edits from review
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson committed Mar 24, 2022
1 parent 52d71e1 commit 85f7b30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/transform/common/types/data_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

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

import { isPopulatedObject } from '../shared_imports';

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/transform/public/app/common/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';

import { HttpFetchError } from '../../../../../../src/core/public';
import { DataView } from '../../../../../../src/plugins/data_views/public';
import type { DataView } from '../../../../../../src/plugins/data_views/public';

import type {
PivotTransformPreviewRequestSchema,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/transform/public/app/hooks/use_index_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export const useIndexData = (

// Get all field names for each returned doc and flatten it
// to a list of unique field names used across all docs.
const allKibanaDataViewFields = getFieldsFromKibanaIndexPattern(dataView);
const allDataViewFields = getFieldsFromKibanaIndexPattern(dataView);
const populatedFields = [...new Set(docs.map(Object.keys).flat(1))]
.filter((d) => allKibanaDataViewFields.includes(d))
.filter((d) => allDataViewFields.includes(d))
.sort();

setCcsWarning(isCrossClusterSearch && isMissingFields);
Expand Down

0 comments on commit 85f7b30

Please sign in to comment.