Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Sep 1, 2020
1 parent 92482a5 commit ac5f84c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import React from 'react';
import { EuiSuperSelect } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import {
CLIENT_GEO_COUNTRY_ISO_CODE,
USER_AGENT_DEVICE,
Expand All @@ -27,27 +28,37 @@ export function BreakdownFilter({

const items: BreakdownItem[] = [
{
name: '- No breakdown -',
name: i18n.translate('xpack.apm.csm.breakDownFilter.noBreakdown', {
defaultMessage: 'No breakdown',
}),
fieldName: NO_BREAKDOWN,
type: 'category',
},
{
name: 'Browser',
name: i18n.translate('xpack.apm.csm.breakdownFilter.browser', {
defaultMessage: 'Browser',
}),
fieldName: USER_AGENT_NAME,
type: 'category',
},
{
name: 'OS',
name: i18n.translate('xpack.apm.csm.breakdownFilter.os', {
defaultMessage: 'OS',
}),
fieldName: USER_AGENT_OS,
type: 'category',
},
{
name: 'Device',
name: i18n.translate('xpack.apm.csm.breakdownFilter.device', {
defaultMessage: 'Device',
}),
fieldName: USER_AGENT_DEVICE,
type: 'category',
},
{
name: 'Location',
name: i18n.translate('xpack.apm.csm.breakdownFilter.location', {
defaultMessage: 'Location',
}),
fieldName: CLIENT_GEO_COUNTRY_ISO_CODE,
type: 'category',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ export function PageViewsTrend() {
[end, start, serviceName, uiFilters, breakdown]
);

const onBreakdownChange = (value: BreakdownItem | null) => {
setBreakdown(value);
};

return (
<div>
<EuiFlexGroup responsive={false}>
Expand All @@ -59,7 +55,7 @@ export function PageViewsTrend() {
<EuiFlexItem grow={false} style={{ width: 170 }}>
<BreakdownFilter
selectedBreakdown={breakdown}
onBreakdownChange={onBreakdownChange}
onBreakdownChange={setBreakdown}
/>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down

0 comments on commit ac5f84c

Please sign in to comment.