Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Documentation and alignment for impact column #47602

Merged
merged 3 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiToolTip } from '@elastic/eui';
import { EuiIcon, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
Expand Down Expand Up @@ -85,11 +85,31 @@ const traceListColumns: Array<ITableColumn<ITransactionGroup>> = [
},
{
field: 'impact',
name: i18n.translate('xpack.apm.tracesTable.impactColumnLabel', {
defaultMessage: 'Impact'
}),
name: (
<EuiToolTip
content={i18n.translate(
'xpack.apm.tracesTable.impactColumnDescription',
{
defaultMessage:
"The most used and slowest endpoints in your service. It's calculated by taking the relative average duration times the number of transactions per minute."
}
)}
>
<>
{i18n.translate('xpack.apm.tracesTable.impactColumnLabel', {
defaultMessage: 'Impact'
})}{' '}
<EuiIcon
size="s"
color="subdued"
type="questionInCircle"
className="eui-alignTop"
/>
</>
</EuiToolTip>
),
width: '20%',
align: 'right',
align: 'left',
sortable: true,
render: (value: number) => <ImpactBar value={value} />
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { EuiToolTip } from '@elastic/eui';
import { EuiIcon, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { useMemo } from 'react';
import styled from 'styled-components';
Expand Down Expand Up @@ -101,9 +101,29 @@ export function TransactionList({ items, isLoading }: Props) {
},
{
field: 'impact',
name: i18n.translate('xpack.apm.transactionsTable.impactColumnLabel', {
defaultMessage: 'Impact'
}),
name: (
<EuiToolTip
content={i18n.translate(
'xpack.apm.transactionsTable.impactColumnDescription',
{
defaultMessage:
"The most used and slowest endpoints in your service. It's calculated by taking the relative average duration times the number of transactions per minute."
}
)}
>
<>
{i18n.translate('xpack.apm.transactionsTable.impactColumnLabel', {
defaultMessage: 'Impact'
})}{' '}
<EuiIcon
size="s"
color="subdued"
type="questionInCircle"
className="eui-alignTop"
/>
</>
</EuiToolTip>
),
sortable: true,
dataType: 'number',
render: (value: number) => <ImpactBar value={value} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { EuiBasicTable } from '@elastic/eui';
import { sortByOrder } from 'lodash';
import React, { useMemo, useCallback } from 'react';
import React, { useMemo, useCallback, ReactNode } from 'react';
import { idx } from '@kbn/elastic-idx';
import { StringMap } from '../../../../typings/common';
import { useUrlParams } from '../../../hooks/useUrlParams';
Expand All @@ -15,7 +15,7 @@ import { fromQuery, toQuery } from '../Links/url_helpers';

// TODO: this should really be imported from EUI
export interface ITableColumn<T> {
name: string;
name: ReactNode;
actions?: StringMap[];
field?: string;
dataType?: string;
Expand Down