[APM] Translations for TraceOverview (#28486) (#28561)

This commit is contained in:
Maryia Lapata 2019-01-14 10:20:32 +03:00 committed by GitHub
parent 823c75f3bd
commit 48d0f2bfc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 7 deletions

View file

@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { ITransactionGroup } from 'x-pack/plugins/apm/server/lib/transaction_groups/transform';
@ -29,7 +30,9 @@ interface Props {
const traceListColumns: ITableColumn[] = [
{
field: 'name',
name: 'Name',
name: i18n.translate('xpack.apm.tracesTable.nameColumnLabel', {
defaultMessage: 'Name'
}),
width: '40%',
sortable: true,
render: (name, group: ITransactionGroup) => (
@ -42,26 +45,43 @@ const traceListColumns: ITableColumn[] = [
},
{
field: 'sample.context.service.name',
name: 'Originating service',
name: i18n.translate(
'xpack.apm.tracesTable.originatingServiceColumnLabel',
{
defaultMessage: 'Originating service'
}
),
sortable: true
},
{
field: 'averageResponseTime',
name: 'Avg. response time',
name: i18n.translate('xpack.apm.tracesTable.avgResponseTimeColumnLabel', {
defaultMessage: 'Avg. response time'
}),
sortable: true,
dataType: 'number',
render: (value: number) => asMillis(value)
},
{
field: 'transactionsPerMinute',
name: 'Traces per minute',
name: i18n.translate('xpack.apm.tracesTable.tracesPerMinuteColumnLabel', {
defaultMessage: 'Traces per minute'
}),
sortable: true,
dataType: 'number',
render: (value: number) => `${value.toLocaleString()} tpm`
render: (value: number) =>
`${value.toLocaleString()} ${i18n.translate(
'xpack.apm.tracesTable.tracesPerMinuteUnitLabel',
{
defaultMessage: 'tpm'
}
)}`
},
{
field: 'impact',
name: 'Impact',
name: i18n.translate('xpack.apm.tracesTable.impactColumnLabel', {
defaultMessage: 'Impact'
}),
width: '20%',
align: 'right',
sortable: true,

View file

@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';
import React from 'react';
import { RRRRenderResponse } from 'react-redux-request';
import { TraceListAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_top_traces';
@ -27,7 +28,11 @@ export function TraceOverview(props: Props) {
items={data}
isLoading={status === 'LOADING'}
noItemsMessage={
<EmptyMessage heading="No traces found for this query" />
<EmptyMessage
heading={i18n.translate('xpack.apm.tracesTable.notFoundLabel', {
defaultMessage: 'No traces found for this query'
})}
/>
}
/>
)}