Skip to content

Commit

Permalink
[MD] skip data source view when pick default
Browse files Browse the repository at this point in the history
Signed-off-by: Kristen Tian <tyarong@amazon.com>
  • Loading branch information
kristenTian committed Oct 14, 2022
1 parent 115105a commit 29881d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* [Multi DataSource] Add experimental callout for index pattern section ([#2523](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2523))
* [Multi DataSource] Add data source config to opensearch-dashboards-docker ([#2557](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2557))
* [Multi DataSource] Make text content dynamically translated & update unit tests ([#2570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2570))
* [Multi DataSource] Skip data source view in index pattern step when pick default ([#2574](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2574))

### 🐛 Bug Fixes
* [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ export const Header: React.FC<HeaderProps> = ({
<EuiFlexGroup>
<EuiFlexItem>
<EuiForm isInvalid={isInputInvalid}>
{dataSourceEnabled
{dataSourceEnabled && dataSourceRef?.title
? renderDataSourceAndIndexPatternInput(
isInputInvalid,
errors,
characterList,
query,
onQueryChanged,
dataSourceRef!
dataSourceRef.title
)
: renderIndexPatternInput(
isInputInvalid,
Expand Down Expand Up @@ -216,7 +216,7 @@ const renderDataSourceAndIndexPatternInput = (
characterList: string,
query: string,
onQueryChanged: (e: React.ChangeEvent<HTMLInputElement>) => void,
dataSourceRef: DataSourceRef
dataSourceTitle: string
) => {
return (
<EuiFlexGroup gutterSize="none">
Expand All @@ -239,7 +239,7 @@ const renderDataSourceAndIndexPatternInput = (
defaultMessage: 'Data source name',
}
)}
value={dataSourceRef!.title}
value={dataSourceTitle}
isInvalid={isInputInvalid}
disabled={true}
data-test-subj="createIndexPatternDataSourceName"
Expand Down

0 comments on commit 29881d1

Please sign in to comment.