Skip to content

Commit

Permalink
Remove annotations; check for rum agent
Browse files Browse the repository at this point in the history
  • Loading branch information
smith committed Oct 30, 2020
1 parent 329c235 commit 953e477
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export function ServiceDetailTabs({ serviceName, tab }: Props) {
})}
</ServiceOverviewLink>
),
render: () => <ServiceOverview serviceName={serviceName} />,
render: () => (
<ServiceOverview agentName={agentName} serviceName={serviceName} />
),
name: 'overview',
};

Expand Down
46 changes: 26 additions & 20 deletions x-pack/plugins/apm/public/components/app/service_overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { useTrackPageview } from '../../../../../observability/public';
import { isRumAgentName } from '../../../../common/agent_name';
import { ChartsSyncContextProvider } from '../../../context/charts_sync_context';
import { ErroneousTransactionsRateChart } from '../../shared/charts/erroneous_transactions_rate_chart';
import { ErrorOverviewLink } from '../../shared/Links/apm/ErrorOverviewLink';
import { ServiceMapLink } from '../../shared/Links/apm/ServiceMapLink';
import { TransactionOverviewLink } from '../../shared/Links/apm/TransactionOverviewLink';

// const rowHeight = 310;
// const latencyChartRowHeight = 230;
const rowHeight = 0;
const latencyChartRowHeight = 0;
const rowHeight = 310;
const latencyChartRowHeight = 230;

const Row = styled(EuiFlexItem)`
height: ${rowHeight}px;
`;
Expand All @@ -34,10 +34,14 @@ const TableLinkFlexItem = styled(EuiFlexItem)`
`;

interface ServiceOverviewProps {
agentName?: string;
serviceName: string;
}

export function ServiceOverview({ serviceName }: ServiceOverviewProps) {
export function ServiceOverview({
agentName,
serviceName,
}: ServiceOverviewProps) {
useTrackPageview({ app: 'apm', path: 'service_overview' });
useTrackPageview({ app: 'apm', path: 'service_overview', delay: 15000 });

Expand Down Expand Up @@ -119,21 +123,23 @@ export function ServiceOverview({ serviceName }: ServiceOverviewProps) {
</Row>
<Row>
<EuiFlexGroup gutterSize="s">
<EuiFlexItem grow={4}>
<EuiPanel>
<EuiTitle size="xs">
<h2>
{i18n.translate(
'xpack.apm.serviceOverview.errorRateChartTitle',
{
defaultMessage: 'Error rate',
}
)}
</h2>
</EuiTitle>
<ErroneousTransactionsRateChart />
</EuiPanel>
</EuiFlexItem>
{!isRumAgentName(agentName) && (
<EuiFlexItem grow={4}>
<EuiPanel>
<EuiTitle size="xs">
<h2>
{i18n.translate(
'xpack.apm.serviceOverview.errorRateChartTitle',
{
defaultMessage: 'Error rate',
}
)}
</h2>
</EuiTitle>
<ErroneousTransactionsRateChart />
</EuiPanel>
</EuiFlexItem>
)}
<EuiFlexItem grow={6}>
<EuiPanel>
<EuiFlexGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { TimeSeries } from '../../../../../typings/timeseries';
import { useUrlParams } from '../../../../hooks/useUrlParams';
import { useChartsSync } from '../../../../hooks/use_charts_sync';
import { unit } from '../../../../style/variables';
import { Annotations } from '../annotations';
import { ChartContainer } from '../chart_container';
import { onBrushEnd } from '../helper/helper';

Expand Down
38 changes: 0 additions & 38 deletions x-pack/plugins/apm/public/hooks/use_annotations.tsx

This file was deleted.

0 comments on commit 953e477

Please sign in to comment.