Skip to content

Commit

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

* update no data source text font and button size

Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>

* update change log and snapshot

Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>

---------

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

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
github-actions[bot] committed Apr 19, 2024
1 parent 536d48a commit 84a95d7
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 84a95d7

Please sign in to comment.