[APM] fixes #24563 by de-duping the column field id 'sample' (#24690)

* [APM] fixes #24563 by replacing de-duping the twice-used column field id

* [APM] fixed issue with service column not sorting in ManagedTable

* [APM] make render field on ITableColumn optional and allowing it to use EUI's default value
This commit is contained in:
Oliver Gupte 2018-10-30 16:31:30 -07:00 committed by GitHub
parent 05bf7cd4d4
commit 57d0e1d22a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View file

@ -6,7 +6,6 @@
import React from 'react';
import styled from 'styled-components';
import { Transaction } from '../../../../typings/Transaction';
import { ITransactionGroup } from '../../../../typings/TransactionGroup';
import { fontSizes, truncate } from '../../../style/variables';
// @ts-ignore
@ -30,23 +29,22 @@ interface Props {
const traceListColumns: ITableColumn[] = [
{
field: 'sample',
field: 'name',
name: 'Name',
width: '40%',
sortable: true,
render: (transaction: Transaction) => (
<TooltipOverlay content={transaction.transaction.name}>
<StyledTransactionLink transaction={transaction}>
{transaction.transaction.name}
render: (name, group: ITransactionGroup) => (
<TooltipOverlay content={name}>
<StyledTransactionLink transaction={group.sample}>
{name}
</StyledTransactionLink>
</TooltipOverlay>
)
},
{
field: 'sample',
field: 'sample.context.service.name',
name: 'Originating service',
sortable: true,
render: (transaction: Transaction) => transaction.context.service.name
sortable: true
},
{
field: 'averageResponseTime',

View file

@ -18,7 +18,7 @@ export interface ITableColumn {
align?: string;
width?: string;
sortable?: boolean;
render: (value: any, item?: any) => any;
render?: (value: any, item?: any) => any;
}
export interface IManagedTableProps {