diff --git a/changelogs/fragments/9057.yml b/changelogs/fragments/9057.yml new file mode 100644 index 000000000000..bd9d8d55c58b --- /dev/null +++ b/changelogs/fragments/9057.yml @@ -0,0 +1,2 @@ +refactor: +- Update data source details tabs to use small buttons ([#9057](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9057)) \ No newline at end of file diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/__snapshots__/acceleration_table.test.tsx.snap b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/__snapshots__/acceleration_table.test.tsx.snap index 29ee4665d5dc..7b54eab80530 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/__snapshots__/acceleration_table.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/__snapshots__/acceleration_table.test.tsx.snap @@ -29,13 +29,13 @@ Array [ class="euiFlexItem euiFlexItem--flexGrowZero" >
diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_table.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_table.tsx index 5437032ee6b6..e205676cf50d 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_table.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_table.tsx @@ -4,7 +4,6 @@ */ import { - EuiButton, EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, @@ -13,6 +12,7 @@ import { EuiLink, EuiLoadingSpinner, EuiPanel, + EuiSmallButton, EuiSpacer, EuiTableFieldDataColumnType, EuiText, @@ -133,15 +133,15 @@ export const AccelerationTable = ({ const RefreshButton = () => { return ( - - Refresh - + Update + ); }; @@ -165,7 +165,7 @@ export const AccelerationTable = ({ - + { /> ); - wrapper.find(EuiButton).simulate('click'); + wrapper.find(EuiSmallButton).simulate('click'); expect(renderCreateAccelerationFlyout).toHaveBeenCalledWith({ dataSourceName: 'test_data_source', handleRefresh, diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_utils.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_utils.tsx index aa49093b3473..7c7daea8410b 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_utils.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/acceleration_management/acceleration_utils.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiButton, EuiHealth } from '@elastic/eui'; +import { EuiHealth, EuiSmallButton } from '@elastic/eui'; import React from 'react'; import { ApplicationStart } from 'opensearch-dashboards/public'; import { DATA_SOURCE_TYPES } from '../../../../framework/constants'; @@ -103,7 +103,7 @@ export const CreateAccelerationFlyoutButton = ({ dataSourceMDSId?: string; }) => { return ( - renderCreateAccelerationFlyout({ dataSourceName, @@ -114,7 +114,7 @@ export const CreateAccelerationFlyoutButton = ({ fill > Create acceleration - + ); }; diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/associated_objects_tab.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/associated_objects_tab.tsx index 2f676e98b177..3592e0f43dfd 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/associated_objects_tab.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/associated_objects_tab.tsx @@ -137,7 +137,7 @@ export const AssociatedObjectsTab: React.FC = (props) }; return ( - +

{panelTitle}

diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/__snapshots__/associated_objects_refresh_button.test.tsx.snap b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/__snapshots__/associated_objects_refresh_button.test.tsx.snap index 36127548fd1b..86740cfe3ff9 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/__snapshots__/associated_objects_refresh_button.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/__snapshots__/associated_objects_refresh_button.test.tsx.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`AssociatedObjectsRefreshButton renders correctly 1`] = ` - Refresh - + `; diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/associated_objects_refresh_button.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/associated_objects_refresh_button.tsx index e737a83562d8..d38ea893a5e5 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/associated_objects_refresh_button.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/associated_object_management/utils/associated_objects_refresh_button.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiButton } from '@elastic/eui'; +import { EuiSmallButton } from '@elastic/eui'; import React from 'react'; import { ASSC_OBJ_REFRESH_BTN } from './associated_objects_tab_utils'; @@ -18,8 +18,13 @@ export const AssociatedObjectsRefreshButton: React.FC + {ASSC_OBJ_REFRESH_BTN} - + ); }; diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/__snapshots__/access_control_tab.test.tsx.snap b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/__snapshots__/access_control_tab.test.tsx.snap index 311cf24611ed..845095474ae2 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/__snapshots__/access_control_tab.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/connection_detail/__snapshots__/access_control_tab.test.tsx.snap @@ -60,7 +60,7 @@ exports[`AccessControlTab Component matches snapshot 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > - - + + + + +
@@ -312,53 +318,60 @@ exports[`Installed Integrations Table test Renders the installed integrations ta fill={true} toggleFlyout={[Function]} > - - - - - + + + + +
diff --git a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/integrations/installed_integrations_table.tsx b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/integrations/installed_integrations_table.tsx index 69070372e1cc..867bf954b477 100644 --- a/src/plugins/data_source_management/public/components/direct_query_data_sources_components/integrations/installed_integrations_table.tsx +++ b/src/plugins/data_source_management/public/components/direct_query_data_sources_components/integrations/installed_integrations_table.tsx @@ -13,7 +13,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiFieldSearch, - EuiButton, + EuiSmallButton, EuiIcon, EuiText, EuiFlyout, @@ -73,9 +73,9 @@ const AddIntegrationButton = ({ toggleFlyout: () => void; }) => { return ( - + Add Integrations - + ); };