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

[MD] Address UX comments on index pattern stack #2611

Merged
merged 1 commit into from
Oct 22, 2022
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Multi DataSource] Skip data source view in index pattern step when pick default ([#2574](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2574))
* [Multi DataSource] Address UX comments on Edit Data source page ([#2629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2629))
* [BUG] Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607))
* [Multi DataSource] Address UX comments on index pattern management stack ([#2611](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2611))

### 🚞 Infrastructure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class DataSourceColumn implements IndexPatternTableColumn<DataSourceMap>
public euiColumn = {
field: 'referenceId',
name: i18n.translate('dataSource.management.dataSourceColumn', {
defaultMessage: 'Data Source',
defaultMessage: 'Data Source Connection',
}),
render: (referenceId: string, index: IndexPatternTableRecord) => {
if (!referenceId) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ jest.mock('../../../../../../../../../plugins/opensearch_dashboards_react/public
afterAll(() => jest.clearAllMocks());

describe('Header', () => {
it('should render normally', () => {
const component = shallowWithIntl(
<Header
onDataSourceSelected={() => {}}
dataSourceRef={{ type: 'type', id: 'id', title: 'title' }!}
goToNextStep={() => {}}
isNextStepDisabled={true}
stepInfo={{ totalStepNumber: 0, currentStepNumber: 0 }}
/>
);

expect(component).toMatchSnapshot();
});

it('should render existing data sources list when choose to use data source', () => {
const component = shallowWithIntl(
<Header
Expand All @@ -51,7 +37,12 @@ describe('Header', () => {
},
});

expect(component).toMatchSnapshot();
expect(
component
.find('[data-test-subj="createIndexPatternStepDataSourceSelectDataSource"]')
.first()
.exists()
).toBeTruthy();
});

it('should disable next step before select data source', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
}
})
.catch(() => {
toasts.addWarning(
toasts.addDanger(
i18n.translate(
'indexPatternManagement.createIndexPattern.stepDataSource.fetchDataSourceError',
{
Expand Down Expand Up @@ -145,6 +145,7 @@ export const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
<EuiFlexItem grow={false}>
<EuiSpacer size="m" />
<EuiSelectable
data-test-subj="createIndexPatternStepDataSourceSelectDataSource"
aria-label={i18n.translate(
'indexPatternManagement.createIndexPattern.stepDataSource.searchlabel',
{
Expand All @@ -160,7 +161,6 @@ export const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
defaultMessage: 'Search data sources',
}
),
isInvalid: !!dataSources,
}}
singleSelection={'always'}
options={dataSources}
Expand Down