Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data source details to use small buttons #9057

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/9057.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
refactor:
- Update data source details tabs to use small buttons ([#9057](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9057))

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

import {
EuiButton,
EuiEmptyPrompt,
EuiFlexGroup,
EuiFlexItem,
Expand All @@ -13,6 +12,7 @@ import {
EuiLink,
EuiLoadingSpinner,
EuiPanel,
EuiSmallButton,
EuiSpacer,
EuiTableFieldDataColumnType,
EuiText,
Expand Down Expand Up @@ -133,15 +133,15 @@ export const AccelerationTable = ({

const RefreshButton = () => {
return (
<EuiButton
<EuiSmallButton
onClick={handleRefresh}
isLoading={
isRefreshing ||
isCatalogCacheFetching(databasesLoadStatus, tablesLoadStatus, accelerationsLoadStatus)
}
>
Refresh
</EuiButton>
Update
</EuiSmallButton>
);
};

Expand All @@ -165,7 +165,7 @@ export const AccelerationTable = ({
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiFlexGroup direction="rowReverse" alignItems="flexEnd">
<EuiFlexGroup direction="rowReverse" alignItems="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<CreateAccelerationFlyoutButton
dataSourceName={dataSourceName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React from 'react';
import { shallow } from 'enzyme';
import { EuiButton, EuiHealth } from '@elastic/eui';
import { EuiHealth, EuiSmallButton } from '@elastic/eui';
import { ApplicationStart } from 'opensearch-dashboards/public';
import { CachedAcceleration } from '../../../../framework/types';
import {
Expand Down Expand Up @@ -136,7 +136,7 @@ describe('acceleration_utils', () => {
/>
);

wrapper.find(EuiButton).simulate('click');
wrapper.find(EuiSmallButton).simulate('click');
expect(renderCreateAccelerationFlyout).toHaveBeenCalledWith({
dataSourceName: 'test_data_source',
handleRefresh,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -103,7 +103,7 @@ export const CreateAccelerationFlyoutButton = ({
dataSourceMDSId?: string;
}) => {
return (
<EuiButton
<EuiSmallButton
onClick={() =>
renderCreateAccelerationFlyout({
dataSourceName,
Expand All @@ -114,7 +114,7 @@ export const CreateAccelerationFlyoutButton = ({
fill
>
Create acceleration
</EuiButton>
</EuiSmallButton>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const AssociatedObjectsTab: React.FC<AssociatedObjectsTabProps> = (props)
};

return (
<EuiFlexGroup direction="row" alignItems="center">
<EuiFlexGroup direction="row" alignItems="center" gutterSize="s">
<EuiFlexItem>
<EuiText size="s">
<h2 className="panel-title">{panelTitle}</h2>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -18,8 +18,13 @@ export const AssociatedObjectsRefreshButton: React.FC<AssociatedObjectsRefreshBu
const { isLoading, onClick } = props;

return (
<EuiButton iconType="refresh" onClick={onClick} isLoading={isLoading} isDisabled={isLoading}>
<EuiSmallButton
iconType="refresh"
onClick={onClick}
isLoading={isLoading}
isDisabled={isLoading}
>
{ASSC_OBJ_REFRESH_BTN}
</EuiButton>
</EuiSmallButton>
);
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
EuiSpacer,
EuiText,
EuiHorizontalRule,
EuiButton,
EuiSmallButton,
} from '@elastic/eui';
import React, { useEffect, useState } from 'react';
import { EuiPanel } from '@elastic/eui';
Expand Down Expand Up @@ -108,12 +108,12 @@ export const AccessControlTab = (props: AccessControlTabProps) => {
</EuiText>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton
<EuiSmallButton
data-test-subj="createButton"
onClick={() => setMode(mode === 'view' ? 'edit' : 'view')}
>
{mode === 'view' ? 'Edit' : 'Cancel'}
</EuiButton>
</EuiSmallButton>
</EuiFlexItem>
</EuiFlexGroup>
);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading