group.tsx 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import type {Group as TGroup} from 'sentry/types';
  2. import {EventOrGroupType, GroupStatus, IssueCategory, IssueType} from 'sentry/types';
  3. import {Project} from './project';
  4. export function Group(params: Partial<TGroup> = {}): TGroup {
  5. const project = Project();
  6. return {
  7. activity: [],
  8. annotations: [],
  9. assignedTo: null,
  10. count: '327482',
  11. culprit: 'fetchData(app/components/group/suggestedOwners/suggestedOwners)',
  12. firstRelease: null,
  13. firstSeen: '2019-04-05T19:44:05.963Z',
  14. hasSeen: false,
  15. id: '1',
  16. isBookmarked: false,
  17. isPublic: false,
  18. isSubscribed: false,
  19. issueCategory: IssueCategory.ERROR,
  20. issueType: IssueType.ERROR,
  21. lastRelease: null,
  22. lastSeen: '2019-04-11T01:08:59Z',
  23. level: 'warning',
  24. logger: '',
  25. metadata: {function: 'fetchData', type: 'RequestError'},
  26. numComments: 0,
  27. participants: [],
  28. permalink: 'https://foo.io/organizations/foo/issues/1234/',
  29. platform: 'javascript',
  30. pluginActions: [],
  31. pluginContexts: [],
  32. pluginIssues: [],
  33. project: Project({
  34. platform: 'javascript',
  35. id: project.id,
  36. slug: project.slug,
  37. }),
  38. seenBy: [],
  39. shareId: '',
  40. shortId: 'JAVASCRIPT-6QS',
  41. stats: {
  42. '24h': [
  43. [1517281200, 2],
  44. [1517310000, 1],
  45. ],
  46. '30d': [
  47. [1514764800, 1],
  48. [1515024000, 122],
  49. ],
  50. },
  51. status: GroupStatus.UNRESOLVED,
  52. statusDetails: {},
  53. subscriptionDetails: null,
  54. // ex tag: {key: 'browser', name: 'Browser', totalValues: 1}
  55. tags: [],
  56. title: 'RequestError: GET /issues/ 404',
  57. type: EventOrGroupType.ERROR,
  58. userCount: 35097,
  59. userReportCount: 0,
  60. ...params,
  61. };
  62. }