diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts index 7a966d2849c9..5e4d80df6ccd 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts @@ -370,7 +370,8 @@ export class IndexPattern implements IIndexPattern { return this.dataSourceRef ? [ { - ...this.dataSourceRef, + id: this.dataSourceRef.id, + type: this.dataSourceRef.type, name: DATA_SOURCE_REFERNECE_NAME, }, ] diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/__snapshots__/header.test.tsx.snap b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/__snapshots__/header.test.tsx.snap index ded0546ce491..8a79ee810f18 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/__snapshots__/header.test.tsx.snap +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/__snapshots__/header.test.tsx.snap @@ -21,7 +21,7 @@ exports[`Header should render existing data sources list when choose to use data @@ -36,25 +36,15 @@ exports[`Header should render existing data sources list when choose to use data id="useDefault" label={ } onChange={[Function]} /> - - - } onChange={[Function]} /> - - - @@ -87,13 +67,7 @@ exports[`Header should render existing data sources list when choose to use data size="m" /> - } + aria-label="Search data sources" isPreFiltered={false} onChange={[Function]} options={Array []} @@ -160,7 +134,7 @@ exports[`Header should render normally 1`] = ` @@ -175,25 +149,15 @@ exports[`Header should render normally 1`] = ` id="useDefault" label={ } onChange={[Function]} /> - - - } onChange={[Function]} /> - - - diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.scss b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.scss deleted file mode 100644 index 048ae2981c05..000000000000 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.scss +++ /dev/null @@ -1,3 +0,0 @@ -.dataSourceRadioHelperText { - text-indent: 24px; -} diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.test.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.test.tsx index dc8b72341b80..8a7aa9b1e461 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.test.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.test.tsx @@ -5,7 +5,6 @@ import React from 'react'; import { Header } from '../header'; -import { shallow } from 'enzyme'; import { shallowWithIntl } from 'test_utils/enzyme_helpers'; jest.mock('../../../../../../../../../plugins/opensearch_dashboards_react/public', () => ({ diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.tsx index 75f641b70164..71df5637f1ba 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_data_source/components/header/header.tsx @@ -4,7 +4,6 @@ */ import React, { Fragment, useState } from 'react'; -import './header.scss'; import { EuiButton, @@ -111,7 +110,7 @@ export const Header: React.FC = (props: HeaderProps) => { @@ -121,49 +120,37 @@ export const Header: React.FC = (props: HeaderProps) => { label={ } checked={defaultChecked} onChange={(e) => onChangeDefaultChecked(e)} compressed /> - - - - + } checked={dataSourceChecked} onChange={(e) => onChangeDataSourceChecked(e)} compressed /> - - - {dataSourceChecked && ( - } + aria-label={i18n.translate( + 'indexPatternManagement.createIndexPattern.stepDataSource.searchlabel', + { + defaultMessage: 'Search data sources', + } + )} searchable searchProps={{ 'data-test-subj': 'selectDataSources',