From 8331a7f9fc32aedfe255b8c6aa279b1ffe18f425 Mon Sep 17 00:00:00 2001 From: Kristen Tian Date: Fri, 14 Oct 2022 10:43:03 -0700 Subject: [PATCH] [MD] skip data source view when pick default Signed-off-by: Kristen Tian --- CHANGELOG.md | 1 + .../step_index_pattern/components/header/header.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed0f52691207..282baefa8132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * [Vis Builder] Fixes visualization shift when editing agg ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) * [Vis Builder] Renames "Histogram" to "Bar" in vis type picker ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) * [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)) ### 🚞 Infrastructure diff --git a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx index 5e8db4ac9208..7c83d4209adb 100644 --- a/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx +++ b/src/plugins/index_pattern_management/public/components/create_index_pattern_wizard/components/step_index_pattern/components/header/header.tsx @@ -103,14 +103,14 @@ export const Header: React.FC = ({ - {dataSourceEnabled + {dataSourceEnabled && dataSourceRef?.title ? renderDataSourceAndIndexPatternInput( isInputInvalid, errors, characterList, query, onQueryChanged, - dataSourceRef! + dataSourceRef.title ) : renderIndexPatternInput( isInputInvalid, @@ -216,7 +216,7 @@ const renderDataSourceAndIndexPatternInput = ( characterList: string, query: string, onQueryChanged: (e: React.ChangeEvent) => void, - dataSourceRef: DataSourceRef + dataSourceTitle: string ) => { return ( @@ -239,7 +239,7 @@ const renderDataSourceAndIndexPatternInput = ( defaultMessage: 'Data source name', } )} - value={dataSourceRef!.title} + value={dataSourceTitle} isInvalid={isInputInvalid} disabled={true} data-test-subj="createIndexPatternDataSourceName"