12345678910111213141516171819202122232425262728293031323334353637383940 |
- import {useState} from 'react';
- import {MRI} from 'sentry/types';
- import {MetricDisplayType} from 'sentry/utils/metrics';
- import {MetricWidget, MetricWidgetProps} from 'sentry/views/ddm/widget';
- // TODO(ddm): move this to admin
- export default function MetricsExplorer() {
- const [widget, setWidget] = useState<MetricWidgetProps>({
- mri: '' as MRI,
- op: undefined,
- query: '',
- groupBy: [],
- displayType: MetricDisplayType.LINE,
- position: 0,
- powerUserMode: true,
- showSummaryTable: true,
- onChange: () => {},
- sort: {name: 'name', order: 'asc'},
- });
- return (
- <MetricWidget
- widget={{
- ...widget,
- onChange: data => {
- setWidget(curr => ({...curr, ...data}));
- },
- }}
- datetime={{
- start: null,
- end: null,
- period: '7d',
- utc: false,
- }}
- projects={[]}
- environments={[]}
- />
- );
- }
|