From bdd0dc79809c7032b606e9652396e21d2170ce02 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:53:07 +0800 Subject: [PATCH] [Bug][DataSource] No restriction on setting default data source (#7396) (#7403) * No restriction on setting default data source * Changeset file for PR #7396 created/updated --------- (cherry picked from commit 5ee9b69f2d65dfa8dc59266aa8f88ddbf6383eaf) Signed-off-by: yubonluo Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7396.yml | 2 ++ .../edit_data_source/components/header/header.test.tsx | 3 --- .../components/edit_data_source/components/header/header.tsx | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/7396.yml diff --git a/changelogs/fragments/7396.yml b/changelogs/fragments/7396.yml new file mode 100644 index 000000000000..db310ba049dd --- /dev/null +++ b/changelogs/fragments/7396.yml @@ -0,0 +1,2 @@ +fix: +- [DataSource] No restriction on setting default data source ([#7396](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7396)) \ No newline at end of file diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.test.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.test.tsx index 4953e21647c7..4bcfb436d529 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.test.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.test.tsx @@ -205,8 +205,5 @@ describe('Datasource Management: Edit Datasource Header', () => { expect(component.find(headerTitleIdentifier).last().text()).toBe(dataSourceName); expect(component.find(deleteIconIdentifier).exists()).toBe(false); }); - test('should not show default icon', () => { - expect(component.find(setDefaultButtonIdentifier).exists()).toBe(false); - }); }); }); diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.tsx index dece5cb78b2b..7ae2f543418d 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/header/header.tsx @@ -177,9 +177,7 @@ export const Header = ({ {/* Test default button */} - {canManageDataSource ? ( - {renderDefaultIcon()} - ) : null} + {renderDefaultIcon()} {/* Test connection button */} {renderTestConnectionButton()} {/* Delete icon button */}