From df6de4e23c89b99e07bc6faae4f1f67a81568e14 Mon Sep 17 00:00:00 2001 From: Lu Yu Date: Tue, 12 Mar 2024 20:22:36 -0700 Subject: [PATCH] [Multiple Datasource] Add component to show single selected data source in read only mode (#6125) * add component to show selected data source in read only mode Signed-off-by: Lu Yu * add change log Signed-off-by: Lu Yu * fix typo and remove unused fields Signed-off-by: Lu Yu * fix snapshot Signed-off-by: Lu Yu --------- Signed-off-by: Lu Yu --- CHANGELOG.md | 1 + .../data_source_menu.test.tsx.snap | 20 +++- .../data_source_menu.test.tsx | 18 +++- .../data_source_menu/data_source_menu.tsx | 60 +++++++----- .../data_source_view.test.tsx.snap | 54 ++++++++++ .../data_source_view.test.tsx | 19 ++++ .../data_source_view/data_source_view.tsx | 98 +++++++++++++++++++ .../components/data_source_view/index.ts | 6 ++ 8 files changed, 250 insertions(+), 26 deletions(-) create mode 100644 src/plugins/data_source_management/public/components/data_source_view/__snapshots__/data_source_view.test.tsx.snap create mode 100644 src/plugins/data_source_management/public/components/data_source_view/data_source_view.test.tsx create mode 100644 src/plugins/data_source_management/public/components/data_source_view/data_source_view.tsx create mode 100644 src/plugins/data_source_management/public/components/data_source_view/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f9e5e4d2ed3..fe283b39b41a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Multiple Datasource] Expose filterfn in datasource menu component to allow filter data sources before rendering in navigation bar ([#6113](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6113)) - [Workspace] Add delete saved objects by workspace functionality([#6013](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6013)) - [Workspace] Add a workspace client in workspace plugin ([#6094](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6094)) +- [Multiple Datasource] Add component to show single selected data source in read only mode ([#6125](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6125)) ### 🐛 Bug Fixes diff --git a/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/data_source_menu.test.tsx.snap b/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/data_source_menu.test.tsx.snap index 19f1e1c660d2..a55591a5df26 100644 --- a/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/data_source_menu.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/data_source_menu/__snapshots__/data_source_menu.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`DataSourceMenu should render normally with local cluster is hidden 1`] = ` +exports[`DataSourceMenu should render data source selectable only with local cluster is hidden 1`] = `