dashboard.tsx 459 B

1234567891011121314151617181920
  1. import type {
  2. DashboardDetails as TDashboardDetails,
  3. DashboardFilters as TDashboardFilters,
  4. Widget as TWidget,
  5. } from 'sentry/views/dashboards/types';
  6. export function Dashboard(
  7. widgets: TWidget[],
  8. props: Partial<TDashboardDetails> = {}
  9. ): TDashboardDetails {
  10. return {
  11. id: '1',
  12. filters: [] as TDashboardFilters,
  13. dateCreated: new Date().toISOString(),
  14. projects: undefined,
  15. title: 'Dashboard',
  16. widgets,
  17. ...props,
  18. };
  19. }