incident.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import {MetricRule} from './metricRule';
  2. export function Incident(params = {}) {
  3. return {
  4. id: '321',
  5. identifier: '123',
  6. organizationId: '3',
  7. dateClosed: '2016-04-19T19:44:05.963Z',
  8. dateStarted: '2016-04-05T19:44:05.963Z',
  9. dateDetected: '2016-04-05T19:44:05.963Z',
  10. dateCreated: '2016-04-05T19:44:05.963Z',
  11. title: 'Too many Chrome errors',
  12. status: 0,
  13. projects: [],
  14. isSubscribed: true,
  15. alertRule: MetricRule(params.alertRule),
  16. activities: [
  17. {
  18. id: '78',
  19. incidentIdentifier: '50729',
  20. user: null,
  21. type: 2,
  22. value: '2',
  23. previousValue: '20',
  24. comment: null,
  25. dateCreated: '2022-03-27T00:38:00Z',
  26. },
  27. {
  28. id: '33',
  29. incidentIdentifier: '50729',
  30. user: null,
  31. type: 2,
  32. value: '20',
  33. previousValue: '1',
  34. comment: null,
  35. dateCreated: '2022-03-26T13:03:00Z',
  36. },
  37. {
  38. id: '32',
  39. incidentIdentifier: '50729',
  40. user: null,
  41. type: 1,
  42. value: null,
  43. previousValue: null,
  44. comment: null,
  45. dateCreated: '2022-03-26T13:02:00Z',
  46. },
  47. {
  48. id: '31',
  49. incidentIdentifier: '50729',
  50. user: null,
  51. type: 4,
  52. value: null,
  53. previousValue: null,
  54. comment: null,
  55. dateCreated: '2022-03-26T12:00:00Z',
  56. },
  57. ],
  58. ...params,
  59. };
  60. }