Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into LastUpdatedTimeStamp
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekReddy1127 authored Oct 20, 2022
2 parents 9dc8436 + 8d5e504 commit 3fde491
Show file tree
Hide file tree
Showing 28 changed files with 493 additions and 622 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Multi DataSource] Make text content dynamically translated & update unit tests ([#2570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2570))
* [Vis Builder] Change classname prefix wiz to vb ([#2581](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2581/files))
* [Vis Builder] Change wizard to vis_builder in file names and paths ([#2587](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2587))
* [Multi DataSource] Address UX comments on Data source list and create page ([#2625](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2625))
* [Vis Builder] Rename wizard to visBuilder in i18n id and formatted message id ([#2635](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2635))

### 🐛 Bug Fixes
* [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401))
Expand All @@ -32,6 +34,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Vis Builder] Update vislib params and misc fixes ([2610](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2610))
* [MD] Add data source param to low-level search call in Discover ([#2431](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2431))
* [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))

### 🚞 Infrastructure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ const createButtonIdentifier = `[data-test-subj="createDataSourceButton"]`;

describe('CreateButton', () => {
const history = (scopedHistoryMock.create() as unknown) as ScopedHistory;
const dataTestSubj = 'createDataSourceButton';
let component: ShallowWrapper<any, Readonly<{}>, React.Component<{}, {}, any>>;

beforeEach(() => {
component = shallow(<CreateButton history={history} />);
component = shallow(<CreateButton history={history} dataTestSubj={dataTestSubj} />);
});

it('should render normally', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import { FormattedMessage } from '@osd/i18n/react';

interface Props {
history: History;
isEmptyState?: boolean;
dataTestSubj: string;
}

export const CreateButton = ({ history }: Props) => {
export const CreateButton = ({ history, isEmptyState, dataTestSubj }: Props) => {
return (
<EuiButton
data-test-subj="createDataSourceButton"
fill={true}
data-test-subj={dataTestSubj}
fill={isEmptyState ? false : true}
onClick={() => history.push('/create')}
>
<FormattedMessage
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ export class CreateDataSourceForm extends React.Component<
return (
<EuiPageContent>
{this.renderHeader()}
<EuiSpacer size="m" />
<EuiForm data-test-subj="data-source-creation">
{/* Endpoint section */}
{this.renderSectionHeader(
Expand Down Expand Up @@ -354,7 +355,7 @@ export class CreateDataSourceForm extends React.Component<
placeholder={i18n.translate(
'dataSourcesManagement.createDataSource.endpointPlaceholder',
{
defaultMessage: 'Sample URL: https://connectionurl.com',
defaultMessage: 'https://connectionurl.com',
}
)}
isInvalid={!!this.state.formErrorsByField.endpoint.length}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const CreateDataSourceWizard: React.FunctionComponent<CreateDataSourceWiz
};

const handleDisplayToastMessage = ({ id, defaultMessage }: ToastMessageItem) => {
toasts.addWarning(i18n.translate(id, { defaultMessage }));
toasts.addDanger(i18n.translate(id, { defaultMessage }));
};

/* Render the creation wizard */
Expand Down
Loading

0 comments on commit 3fde491

Please sign in to comment.