mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import {Fragment} from 'react';
|
|
import type {Location} from 'history';
|
|
|
|
import {HeaderTitleLegend} from 'sentry/components/charts/styles';
|
|
import QuestionTooltip from 'sentry/components/questionTooltip';
|
|
import {t, tct} from 'sentry/locale';
|
|
import type {OrganizationSummary} from 'sentry/types';
|
|
|
|
import type {ViewProps} from '../../../types';
|
|
import {SpanOperationBreakdownFilter} from '../../filter';
|
|
|
|
import Content from './content';
|
|
|
|
type Props = ViewProps & {
|
|
currentFilter: SpanOperationBreakdownFilter;
|
|
location: Location;
|
|
organization: OrganizationSummary;
|
|
queryExtras?: Record<string, string>;
|
|
totalCount?: number | null;
|
|
};
|
|
|
|
function LatencyChart({currentFilter, ...props}: Props) {
|
|
const header = (
|
|
<HeaderTitleLegend>
|
|
{currentFilter === SpanOperationBreakdownFilter.NONE
|
|
? t('Duration Distribution')
|
|
: tct('Span Operation Distribution - [operationName]', {
|
|
operationName: currentFilter,
|
|
})}
|
|
<QuestionTooltip
|
|
position="top"
|
|
size="sm"
|
|
title={t(
|
|
`Duration Distribution reflects the volume of transactions per median duration.`
|
|
)}
|
|
/>
|
|
</HeaderTitleLegend>
|
|
);
|
|
|
|
return (
|
|
<Fragment>
|
|
{header}
|
|
<Content {...props} currentFilter={currentFilter} />
|
|
</Fragment>
|
|
);
|
|
}
|
|
|
|
export default LatencyChart;
|