diff --git a/changelogs/fragments/8383.yml b/changelogs/fragments/8383.yml
new file mode 100644
index 000000000000..db594be75661
--- /dev/null
+++ b/changelogs/fragments/8383.yml
@@ -0,0 +1,2 @@
+feat:
+- Refactor data source association panel ([#8383](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8383))
\ No newline at end of file
diff --git a/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx b/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx
index 459ed4085920..d0df618c091b 100644
--- a/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx
+++ b/src/plugins/workspace/public/components/workspace_creator/workspace_creator_form.tsx
@@ -4,7 +4,15 @@
*/
import React, { useCallback, useRef } from 'react';
-import { EuiSpacer, EuiTitle, EuiForm, EuiText, EuiFlexItem, EuiFlexGroup } from '@elastic/eui';
+import {
+ EuiSpacer,
+ EuiTitle,
+ EuiForm,
+ EuiText,
+ EuiFlexItem,
+ EuiFlexGroup,
+ EuiPanel,
+} from '@elastic/eui';
import { i18n } from '@osd/i18n';
import {
useWorkspaceForm,
@@ -110,29 +118,31 @@ export const WorkspaceCreatorForm = (props: WorkspaceCreatorFormProps) => {
{/* SelectDataSourcePanel is only visible for dashboard admin and when data source is enabled*/}
{isDashboardAdmin && isDataSourceEnabled && (
<>
-
-
- {i18n.translate('workspace.creator.form.associateDataSourceTitle', {
- defaultMessage: 'Associate data sources',
+
+
+
+ {i18n.translate('workspace.creator.form.associateDataSourceTitle', {
+ defaultMessage: 'Associate data sources',
+ })}
+
+
+
+ {i18n.translate('workspace.creator.form.associateDataSourceDescription', {
+ defaultMessage:
+ 'Add at least one data source that will be available in the workspace. If a selected OpenSearch connection has related Direct Query connections, they will also be available in the workspace.',
})}
-
-
-
- {i18n.translate('workspace.creator.form.associateDataSourceDescription', {
- defaultMessage:
- 'Add data sources that will be available in the workspace. If a selected OpenSearch connection has embedded Direct Query connection, they will also be available in the workspace.',
- })}
-
-
+
+
+
>
diff --git a/src/plugins/workspace/public/components/workspace_form/select_data_source_panel.tsx b/src/plugins/workspace/public/components/workspace_form/select_data_source_panel.tsx
index b1ec518d77c1..282a4dc77efd 100644
--- a/src/plugins/workspace/public/components/workspace_form/select_data_source_panel.tsx
+++ b/src/plugins/workspace/public/components/workspace_form/select_data_source_panel.tsx
@@ -79,7 +79,7 @@ export const SelectDataSourcePanel = ({
data-test-subj="workspace-creator-dataSources-assign-button"
>
{i18n.translate('workspace.form.selectDataSourcePanel.addNew', {
- defaultMessage: 'Add OpenSearch connections',
+ defaultMessage: 'Associate OpenSearch connections',
})}
);
@@ -94,7 +94,7 @@ export const SelectDataSourcePanel = ({
data-test-subj="workspace-creator-dqc-assign-button"
>
{i18n.translate('workspace.form.selectDataSourcePanel.addNewDQCs', {
- defaultMessage: 'Add direct query connections',
+ defaultMessage: 'Associate direct query connections',
})}
);
@@ -130,10 +130,8 @@ export const SelectDataSourcePanel = ({
{addDirectQueryConnectionsButton}
)}
-
-
- {assignedDataSourceConnections.length > 0 && renderTableContent()}
-
+ {assignedDataSourceConnections.length > 0 && }
+ {assignedDataSourceConnections.length > 0 && renderTableContent()}
{modalVisible && chrome && (