Skip to content

Commit

Permalink
[ML] Show tip to drag to select a range in the Trace samples distribu…
Browse files Browse the repository at this point in the history
…tion chart panel.
  • Loading branch information
walterra committed Aug 17, 2021
1 parent f53d428 commit 086c5a0
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
EuiButtonEmpty,
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiSpacer,
EuiText,
EuiTitle,
Expand Down Expand Up @@ -56,6 +57,13 @@ export function TransactionDistribution({

const { transactionName, start, end } = urlParams;

const emptySelectionText = i18n.translate(
'xpack.apm.transactionDetails.emptySelectionText',
{
defaultMessage: 'Click and drag to select a range',
}
);

const clearSelectionButtonLabel = i18n.translate(
'xpack.apm.transactionDetails.clearSelectionButtonLabel',
{
Expand Down Expand Up @@ -136,6 +144,24 @@ export function TransactionDistribution({
</h5>
</EuiTitle>
</EuiFlexItem>
{!selection && (
<EuiFlexItem>
<EuiFlexGroup justifyContent="flexEnd" gutterSize="xs">
<EuiFlexItem
grow={false}
style={{ flexDirection: 'row', alignItems: 'center' }}
>
<EuiIcon type="iInCircle" title={emptySelectionText} size="s" />
</EuiFlexItem>
<EuiFlexItem
grow={false}
style={{ flexDirection: 'row', alignItems: 'center' }}
>
<EuiText size="xs">{emptySelectionText}</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
)}
{selection && (
<EuiFlexItem>
<EuiFlexGroup justifyContent="flexEnd" gutterSize="xs">
Expand Down

0 comments on commit 086c5a0

Please sign in to comment.