serviceIncident.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import {StatusPageComponent, type StatuspageIncident} from 'sentry/types/system';
  2. export function ServiceIncidentFixture(
  3. params: Partial<StatuspageIncident> = {}
  4. ): StatuspageIncident {
  5. return {
  6. id: '1',
  7. page_id: '',
  8. status: 'unresolved',
  9. name: 'Test Incident',
  10. impact: 'major',
  11. monitoring_at: undefined,
  12. created_at: '2022-05-23T13:33:38.737-07:00',
  13. started_at: undefined,
  14. resolved_at: undefined,
  15. updated_at: undefined,
  16. incident_updates: [
  17. {
  18. id: '1',
  19. incident_id: '1',
  20. status: 'monitoring',
  21. body: 'Things look bad',
  22. affected_components: [],
  23. created_at: '2022-05-23T13:33:38.737-07:00',
  24. updated_at: '2022-05-23T13:33:38.737-07:00',
  25. display_at: '2022-05-23T13:33:38.737-07:00',
  26. },
  27. {
  28. id: '2',
  29. incident_id: '1',
  30. status: 'investigating',
  31. body: 'Investigating',
  32. affected_components: [],
  33. updated_at: '2022-05-23T13:45:38.737-07:00',
  34. created_at: '2022-05-23T13:45:38.737-07:00',
  35. display_at: '2022-05-23T13:45:38.737-07:00',
  36. },
  37. ],
  38. components: [
  39. {
  40. id: StatusPageComponent.US_ERRORS,
  41. page_id: '',
  42. position: 1,
  43. showcase: false,
  44. description: 'Errors ingestion',
  45. group: false,
  46. group_id: '1',
  47. only_show_if_degraded: false,
  48. name: '',
  49. status: 'major_outage',
  50. start_date: '2022-05-23',
  51. updated_at: '2022-05-23T13:33:38.737-07:00',
  52. created_at: '2022-05-23T13:33:38.737-07:00',
  53. },
  54. ],
  55. shortlink: 'https://status.sentry.io',
  56. ...params,
  57. };
  58. }