diff --git a/src/sentry/static/sentry/app/components/eventOrGroupHeader.jsx b/src/sentry/static/sentry/app/components/eventOrGroupHeader.jsx index bedd78e4a40964..3629debe5e3795 100644 --- a/src/sentry/static/sentry/app/components/eventOrGroupHeader.jsx +++ b/src/sentry/static/sentry/app/components/eventOrGroupHeader.jsx @@ -5,7 +5,7 @@ import styled, {css} from 'react-emotion'; import classNames from 'classnames'; import {capitalize} from 'lodash'; -import {Metadata} from 'app/sentryTypes'; +import SentryTypes from 'app/sentryTypes'; import EventOrGroupTitle from 'app/components/eventOrGroupTitle'; import Tooltip from 'app/components/tooltip'; import {getMessage, getLocation} from 'app/utils/events'; @@ -17,22 +17,7 @@ class EventOrGroupHeader extends React.Component { static propTypes = { params: PropTypes.object, /** Either an issue or event **/ - data: PropTypes.shape({ - id: PropTypes.string, - level: PropTypes.string, - type: PropTypes.oneOf([ - 'error', - 'csp', - 'hpkp', - 'expectct', - 'expectstaple', - 'default', - ]).isRequired, - title: PropTypes.string, - metadata: Metadata, - groupID: PropTypes.string, - culprit: PropTypes.string, - }), + data: PropTypes.oneOfType([SentryTypes.Event, SentryTypes.Group]), includeLink: PropTypes.bool, hideIcons: PropTypes.bool, hideLevel: PropTypes.bool, diff --git a/src/sentry/static/sentry/app/components/eventOrGroupTitle.jsx b/src/sentry/static/sentry/app/components/eventOrGroupTitle.jsx index f5f07a118374e0..58b7a0c13a7c53 100644 --- a/src/sentry/static/sentry/app/components/eventOrGroupTitle.jsx +++ b/src/sentry/static/sentry/app/components/eventOrGroupTitle.jsx @@ -13,6 +13,7 @@ class EventOrGroupTitle extends React.Component { 'expectct', 'expectstaple', 'default', + 'transaction', ]).isRequired, title: PropTypes.string, metadata: Metadata.isRequired, diff --git a/src/sentry/static/sentry/app/components/events/groupingInfo.jsx b/src/sentry/static/sentry/app/components/events/groupingInfo.jsx index 9d15e6580dc22e..c8d3ff8af00653 100644 --- a/src/sentry/static/sentry/app/components/events/groupingInfo.jsx +++ b/src/sentry/static/sentry/app/components/events/groupingInfo.jsx @@ -248,7 +248,6 @@ class EventGroupingInfo extends AsyncComponent { static propTypes = { api: PropTypes.object, organization: SentryTypes.Organization.isRequired, - group: SentryTypes.Group.isRequired, projectId: PropTypes.string.isRequired, event: SentryTypes.Event.isRequired, }; diff --git a/src/sentry/static/sentry/app/sentryTypes.jsx b/src/sentry/static/sentry/app/sentryTypes.jsx index 5de110892074e9..0abbf0e450c862 100644 --- a/src/sentry/static/sentry/app/sentryTypes.jsx +++ b/src/sentry/static/sentry/app/sentryTypes.jsx @@ -148,6 +148,16 @@ export const Member = PropTypes.shape({ user: User, }); +const EventOrGroupType = PropTypes.oneOf([ + 'error', + 'csp', + 'hpkp', + 'expectct', + 'expectstaple', + 'default', + 'transaction', +]); + export const Group = PropTypes.shape({ id: PropTypes.string.isRequired, annotations: PropTypes.array, @@ -174,7 +184,7 @@ export const Group = PropTypes.shape({ status: PropTypes.string, statusDetails: PropTypes.object, title: PropTypes.string, - type: PropTypes.oneOf(['error', 'csp', 'default']), + type: EventOrGroupType, userCount: PropTypes.number, }); @@ -186,7 +196,7 @@ export const Event = PropTypes.shape({ dateReceived: PropTypes.string, entries: PropTypes.arrayOf( PropTypes.shape({ - data: PropTypes.object, + data: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), type: PropTypes.string, }) ), @@ -212,7 +222,7 @@ export const Event = PropTypes.shape({ value: PropTypes.string, }) ), - type: PropTypes.oneOf(['error', 'csp', 'default']), + type: EventOrGroupType, user: PropTypes.object, });