mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
31 lines
766 B
TypeScript
31 lines
766 B
TypeScript
import type {Location} from 'history';
|
|
|
|
import OptionSelector from 'sentry/components/charts/optionSelector';
|
|
import {t} from 'sentry/locale';
|
|
import Histogram from 'sentry/utils/performance/histogram';
|
|
|
|
import {ZOOM_END, ZOOM_START} from './utils';
|
|
|
|
type Props = {
|
|
location: Location;
|
|
};
|
|
|
|
function ChartControls({location}: Props) {
|
|
return (
|
|
<Histogram location={location} zoomKeys={[ZOOM_START, ZOOM_END]}>
|
|
{({filterOptions, handleFilterChange, activeFilter}) => {
|
|
return (
|
|
<OptionSelector
|
|
title={t('Outliers')}
|
|
selected={activeFilter.value}
|
|
options={filterOptions}
|
|
onChange={handleFilterChange}
|
|
/>
|
|
);
|
|
}}
|
|
</Histogram>
|
|
);
|
|
}
|
|
|
|
export default ChartControls;
|