Skip to content

Commit

Permalink
[SECURITY_SOLUTION] truncate Hostname and add tooltip in flyout (#84086)
Browse files Browse the repository at this point in the history
* truncate Hostname and add tooltip in flyout

* remove leading and trainling spaces
  • Loading branch information
kevinlog authored Nov 23, 2020
1 parent c45fe18 commit 4837491
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiText,
EuiSpacer,
EuiEmptyPrompt,
EuiToolTip,
} from '@elastic/eui';
import { useHistory } from 'react-router-dom';
import { FormattedMessage } from '@kbn/i18n/react';
Expand Down Expand Up @@ -84,13 +85,20 @@ export const EndpointDetailsFlyout = memo(() => {
size="s"
>
<EuiFlyoutHeader hasBorder>
<EuiTitle size="s">
{loading ? (
<EuiLoadingContent lines={1} />
) : (
<h2 data-test-subj="endpointDetailsFlyoutTitle"> {details?.host?.hostname} </h2>
)}
</EuiTitle>
{loading ? (
<EuiLoadingContent lines={1} />
) : (
<EuiToolTip content={details?.host?.hostname} anchorClassName="eui-textTruncate">
<EuiTitle size="s">
<h2
style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}
data-test-subj="endpointDetailsFlyoutTitle"
>
{details?.host?.hostname}
</h2>
</EuiTitle>
</EuiToolTip>
)}
</EuiFlyoutHeader>
{details === undefined ? (
<>
Expand Down

0 comments on commit 4837491

Please sign in to comment.