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 <[email protected]>

* update change log and snapshot

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

---------

Signed-off-by: yujin-emma <[email protected]>
  • Loading branch information
yujin-emma authored Apr 19, 2024
1 parent fb76ee9 commit bbde563
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 99 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Multiple Datasource] Add default icon in multi-selectable picker ([#6357](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6357))
- [Multiple Datasource] Add empty state component for no connected data source ([#6499](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6499))
- [Multiple Datasource] Add popover for empty state and redirect to data source management page([#6514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6514))
- [Multiple Datasource] Update empty state font size and footer button size to small ([6549](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6549))
- [Workspace] Add APIs to support plugin state in request ([#6303](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6303))
- [Workspace] Filter left nav menu items according to the current workspace ([#6234](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6234))
- [Multiple Datasource] Add multi data source support to Timeline ([#6385](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6385))
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 @@ -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 bbde563

Please sign in to comment.