Skip to content

Commit

Permalink
[APM] fixes #24563 by de-duping the column field id 'sample' (#24690)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
ogupte committed Oct 30, 2018
1 parent 05bf7cd commit 57d0e1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 57d0e1d

Please sign in to comment.