widget.tsx 375 B

123456789101112131415
  1. import type {
  2. Widget as TWidget,
  3. WidgetQuery as TWidgetQuery,
  4. } from 'sentry/views/dashboards/types';
  5. import {DisplayType} from 'sentry/views/dashboards/types';
  6. export function Widget(queries: TWidgetQuery[], options: Partial<TWidget>): TWidget {
  7. return {
  8. displayType: DisplayType.LINE,
  9. interval: '1d',
  10. queries,
  11. title: 'Widget',
  12. ...options,
  13. };
  14. }