From 883925692ee65bd6b1a1c1453a6beda14c5b3ef4 Mon Sep 17 00:00:00 2001 From: Lu Yu Date: Wed, 6 Mar 2024 11:28:47 -0800 Subject: [PATCH] [MD] Change cluster selector component name to data source selector (#6042) * change component name Signed-off-by: Lu Yu * add change log Signed-off-by: Lu Yu --------- Signed-off-by: Lu Yu --- CHANGELOG.md | 1 + .../create_cluster_selector.tsx | 11 ------ ...create_data_source_selector.test.tsx.snap} | 6 +-- .../data_source_selector.test.tsx.snap} | 12 +++--- .../create_data_source_selector.test.tsx} | 6 +-- .../create_data_source_selector.tsx | 11 ++++++ .../data_source_selector.test.tsx} | 12 +++--- .../data_source_selector.tsx} | 39 ++++++++++--------- .../index.ts | 2 +- .../data_source_management/public/index.ts | 2 +- .../data_source_management/public/plugin.ts | 8 ++-- src/plugins/dev_tools/public/application.tsx | 6 +-- src/plugins/dev_tools/public/index.scss | 2 +- .../components/tutorial_directory.js | 6 +-- .../__snapshots__/flyout.test.tsx.snap | 4 +- .../objects_table/components/flyout.tsx | 4 +- 16 files changed, 68 insertions(+), 64 deletions(-) delete mode 100644 src/plugins/data_source_management/public/components/cluster_selector/create_cluster_selector.tsx rename src/plugins/data_source_management/public/components/{cluster_selector/__snapshots__/create_cluster_selector.test.tsx.snap => data_source_selector/__snapshots__/create_data_source_selector.test.tsx.snap} (97%) rename src/plugins/data_source_management/public/components/{cluster_selector/__snapshots__/cluster_selector.test.tsx.snap => data_source_selector/__snapshots__/data_source_selector.test.tsx.snap} (79%) rename src/plugins/data_source_management/public/components/{cluster_selector/create_cluster_selector.test.tsx => data_source_selector/create_data_source_selector.test.tsx} (85%) create mode 100644 src/plugins/data_source_management/public/components/data_source_selector/create_data_source_selector.tsx rename src/plugins/data_source_management/public/components/{cluster_selector/cluster_selector.test.tsx => data_source_selector/data_source_selector.test.tsx} (91%) rename src/plugins/data_source_management/public/components/{cluster_selector/cluster_selector.tsx => data_source_selector/data_source_selector.tsx} (67%) rename src/plugins/data_source_management/public/components/{cluster_selector => data_source_selector}/index.ts (57%) diff --git a/CHANGELOG.md b/CHANGELOG.md index b22b5556ac33..0addb1e6d221 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### 🛡 Security ### 📈 Features/Enhancements +- [MD]Change cluster selector component name to data source selector ([#6042](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6042)) ### 🐛 Bug Fixes diff --git a/src/plugins/data_source_management/public/components/cluster_selector/create_cluster_selector.tsx b/src/plugins/data_source_management/public/components/cluster_selector/create_cluster_selector.tsx deleted file mode 100644 index 02696e8747f9..000000000000 --- a/src/plugins/data_source_management/public/components/cluster_selector/create_cluster_selector.tsx +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from 'react'; -import { ClusterSelector, ClusterSelectorProps } from './cluster_selector'; - -export function createClusterSelector() { - return (props: ClusterSelectorProps) => ; -} diff --git a/src/plugins/data_source_management/public/components/cluster_selector/__snapshots__/create_cluster_selector.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_selector/__snapshots__/create_data_source_selector.test.tsx.snap similarity index 97% rename from src/plugins/data_source_management/public/components/cluster_selector/__snapshots__/create_cluster_selector.test.tsx.snap rename to src/plugins/data_source_management/public/components/data_source_selector/__snapshots__/create_data_source_selector.test.tsx.snap index 68698f7adabe..4ce6e1bc30ab 100644 --- a/src/plugins/data_source_management/public/components/cluster_selector/__snapshots__/create_cluster_selector.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_selector/__snapshots__/create_data_source_selector.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`create cluster selector should render normally 1`] = ` +exports[`create data source selector should render normally 1`] = ` Object { "asFragment": [Function], "baseElement": @@ -10,7 +10,7 @@ Object { aria-haspopup="listbox" aria-label="Select a data source" class="euiComboBox euiComboBox--compressed" - data-test-subj="clusterSelectorComboBox" + data-test-subj="dataSourceSelectorComboBox" role="combobox" >