Skip to content

Commit

Permalink
[Multiple Datasource]update no data source text font and button size (o…
Browse files Browse the repository at this point in the history
…pensearch-project#6549) (opensearch-project#6551)

* update no data source text font and button size

Signed-off-by: yujin-emma <[email protected]>

* update change log and snapshot

Signed-off-by: yujin-emma <[email protected]>

---------

Signed-off-by: yujin-emma <[email protected]>
(cherry picked from commit bbde563)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lu Yu <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2024
1 parent 2a641de commit 5a366e6
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 99 deletions.

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 @@ -8,12 +8,12 @@ import React, { useState } from 'react';
import {
EuiButton,
EuiButtonEmpty,
EuiContextMenuPanel,
EuiHorizontalRule,
EuiPanel,
EuiPopover,
EuiSpacer,
EuiText,
EuiPopoverFooter,
EuiFlexGroup,
EuiFlexItem,
} from '@elastic/eui';
import { ApplicationStart } from 'opensearch-dashboards/public';
import { FormattedMessage } from 'react-intl';
Expand Down Expand Up @@ -55,6 +55,7 @@ export const NoDataSource: React.FC<DataSourceDropDownHeaderProps> = ({
iconSide="right"
data-test-subj="dataSourceEmptyStateManageDataSourceButton"
fill={false}
size="s"
onClick={() =>
application?.navigateToApp('management', {
path: `opensearch-dashboards/${DSM_APP_ID}`,
Expand All @@ -69,7 +70,7 @@ export const NoDataSource: React.FC<DataSourceDropDownHeaderProps> = ({
);
const text = (
<>
<EuiText>
<EuiText size="s" textAlign="center">
{
<FormattedMessage
id="dataSourcesManagement.dataSourceMenu.noData"
Expand All @@ -78,7 +79,7 @@ export const NoDataSource: React.FC<DataSourceDropDownHeaderProps> = ({
}
</EuiText>

<EuiText>
<EuiText size="s" textAlign="center">
{
<FormattedMessage
id="dataSourcesManagement.dataSourceMenu.connect"
Expand All @@ -100,27 +101,32 @@ export const NoDataSource: React.FC<DataSourceDropDownHeaderProps> = ({
anchorPosition="downLeft"
data-test-subj={'dataSourceEmptyStatePopover'}
>
<EuiContextMenuPanel>
<EuiPanel className={'dataSourceSelectableOuiPanel'} color="transparent" paddingSize="s">
<DataSourceDropDownHeader
activeDataSourceCount={activeDataSourceCount}
totalDataSourceCount={totalDataSourceCount}
application={application}
/>
<EuiHorizontalRule margin="none" />
<EuiSpacer size="s" />
<EuiPanel
hasBorder={false}
hasShadow={false}
className="dataSourceEmptyStatePanel"
data-test-subj="datasourceTableEmptyState"
>
{text}
<EuiSpacer />
{redirectButton}
</EuiPanel>
<DataSourceDropDownHeader
activeDataSourceCount={activeDataSourceCount}
totalDataSourceCount={totalDataSourceCount}
application={application}
/>
<EuiPanel
className={'dataSourceSelectableOuiPanel'}
hasBorder={false}
color="transparent"
paddingSize="none"
borderRadius="none"
>
<EuiPanel
hasBorder={false}
hasShadow={false}
className="dataSourceEmptyStatePanel"
data-test-subj="datasourceTableEmptyState"
>
{text}
</EuiPanel>
</EuiContextMenuPanel>
</EuiPanel>
<EuiPopoverFooter>
<EuiFlexGroup justifyContent="spaceAround">
<EuiFlexItem>{redirectButton}</EuiFlexItem>
</EuiFlexGroup>
</EuiPopoverFooter>
</EuiPopover>
);
};

0 comments on commit 5a366e6

Please sign in to comment.