[Security Solution] [Detection & Response] [134550] Fix tooltip render location problem (#138335) (#138967)

* utilize eui-textTruncate to get better placement for ToolTip

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 83345de6f0)

Co-authored-by: Kristof C <kpac.ja@gmail.com>
This commit is contained in:
Kibana Machine 2022-08-16 21:56:55 -04:00 committed by GitHub
parent 8250d799c7
commit 71b354aa46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 10 deletions

View file

@ -101,12 +101,13 @@ const getTableColumns: GetTableColumns = () => [
{
field: 'id',
name: i18n.CASES_TABLE_COLUMN_NAME,
truncateText: true,
textOnly: true,
'data-test-subj': 'recentlyCreatedCaseName',
render: (id: string, { name }) => (
<EuiToolTip title={i18n.OPEN_CASE_DETAIL_TOOLTIP} content={name}>
<EuiToolTip
title={i18n.OPEN_CASE_DETAIL_TOOLTIP}
content={name}
anchorClassName="eui-textTruncate"
>
<CaseDetailsLink detailName={id}>{name}</CaseDetailsLink>
</EuiToolTip>
),

View file

@ -101,11 +101,13 @@ const getTableColumns: GetTableColumns = (handleClick) => [
{
field: 'hostName',
name: i18n.HOST_ALERTS_HOSTNAME_COLUMN,
truncateText: true,
textOnly: true,
'data-test-subj': 'hostSeverityAlertsTable-hostName',
render: (hostName: string) => (
<EuiToolTip title={i18n.OPEN_HOST_DETAIL_TOOLTIP} content={hostName}>
<EuiToolTip
title={i18n.OPEN_HOST_DETAIL_TOOLTIP}
content={hostName}
anchorClassName="eui-textTruncate"
>
<HostDetailsLink hostName={hostName} />
</EuiToolTip>
),

View file

@ -59,6 +59,7 @@ export const getTableColumns: GetTableColumns = ({ getAppUrl, navigateTo, openRu
data-test-subj={`${id}-tooltip`}
title={i18n.OPEN_RULE_DETAIL_TOOLTIP}
content={name}
anchorClassName="eui-textTruncate"
>
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
<EuiLink

View file

@ -101,11 +101,13 @@ const getTableColumns: GetTableColumns = (handleClick) => [
{
field: 'userName',
name: i18n.USER_ALERTS_USERNAME_COLUMN,
truncateText: true,
textOnly: true,
'data-test-subj': 'userSeverityAlertsTable-userName',
render: (userName: string) => (
<EuiToolTip title={i18n.OPEN_USER_DETAIL_TOOLTIP} content={userName}>
<EuiToolTip
title={i18n.OPEN_USER_DETAIL_TOOLTIP}
content={userName}
anchorClassName="eui-textTruncate"
>
<UserDetailsLink userName={userName} />
</EuiToolTip>
),