Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions src/sentry/static/sentry/app/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import React from 'react';

import App from 'app/views/app';
import CreateProject from 'app/views/onboarding/createProject';
import GroupDetails from 'app/views/groupDetails';
import GroupEvents from 'app/views/groupEvents';
import GroupEventDetails from 'app/views/groupEventDetails';
import GroupMergedView from 'app/views/groupMerged/groupMergedView';
import GroupSimilarView from 'app/views/groupSimilar/groupSimilarView';
import GroupTagValues from 'app/views/groupTagValues';
import GroupTags from 'app/views/groupTags';
import GroupUserFeedback from 'app/views/groupUserFeedback';
import ProjectGroupDetails from 'app/views/groupDetails/project/index';
import ProjectGroupEvents from 'app/views/groupDetails/project/groupEvents';
import ProjectGroupEventDetails from 'app/views/groupDetails/project/groupEventDetails';
import ProjectGroupMergedView from 'app/views/groupDetails/project/groupMerged';
import ProjectGroupSimilarView from 'app/views/groupDetails/project/groupSimilar';
import ProjectGroupTagValues from 'app/views/groupDetails/project/groupTagValues';
import ProjectGroupTags from 'app/views/groupDetails/project/groupTags';
import ProjectGroupUserFeedback from 'app/views/groupDetails/project/groupUserFeedback';
import HookStore from 'app/stores/hookStore';
import LazyLoad from 'app/components/lazyLoad';
import MyIssuesAssignedToMe from 'app/views/myIssues/assignedToMe';
Expand Down Expand Up @@ -1072,25 +1072,28 @@ function routes() {
<Redirect from="group/:groupId/" to="issues/:groupId/" />
<Route
path="issues/:groupId/"
component={errorHandler(GroupDetails)}
component={errorHandler(ProjectGroupDetails)}
ignoreScrollBehavior
>
<IndexRoute component={errorHandler(GroupEventDetails)} />
<IndexRoute component={errorHandler(ProjectGroupEventDetails)} />

<Route
path="activity/"
componentPromise={() =>
import(/* webpackChunkName: "GroupActivity" */ './views/groupActivity')}
import(/* webpackChunkName: "GroupActivity" */ './views/groupDetails/project/groupActivity')}
component={errorHandler(LazyLoad)}
/>

<Route path="events/:eventId/" component={errorHandler(GroupEventDetails)} />
<Route path="events/" component={errorHandler(GroupEvents)} />
<Route path="tags/" component={errorHandler(GroupTags)} />
<Route path="tags/:tagKey/" component={errorHandler(GroupTagValues)} />
<Route path="feedback/" component={errorHandler(GroupUserFeedback)} />
<Route path="similar/" component={errorHandler(GroupSimilarView)} />
<Route path="merged/" component={errorHandler(GroupMergedView)} />
<Route
path="events/:eventId/"
component={errorHandler(ProjectGroupEventDetails)}
/>
<Route path="events/" component={errorHandler(ProjectGroupEvents)} />
<Route path="tags/" component={errorHandler(ProjectGroupTags)} />
<Route path="tags/:tagKey/" component={errorHandler(ProjectGroupTagValues)} />
<Route path="feedback/" component={errorHandler(ProjectGroupUserFeedback)} />
<Route path="similar/" component={errorHandler(ProjectGroupSimilarView)} />
<Route path="merged/" component={errorHandler(ProjectGroupMergedView)} />
</Route>

<Route path="events/:eventId/" component={errorHandler(ProjectEventRedirect)} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import {withMeta} from 'app/components/events/meta/metaProxy';
import ApiMixin from 'app/mixins/apiMixin';
import EventEntries from 'app/components/events/eventEntries';
import GroupEventDetailsLoadingError from 'app/components/errors/groupEventDetailsLoadingError';
import GroupEventToolbar from 'app/views/groupDetails/eventToolbar';
import GroupSidebar from 'app/components/group/sidebar';
import GroupState from 'app/mixins/groupState';
import LoadingIndicator from 'app/components/loadingIndicator';
import MutedBox from 'app/components/mutedBox';
import ResolutionBox from 'app/components/resolutionBox';
import withEnvironmentInQueryString from 'app/utils/withEnvironmentInQueryString';

import GroupEventToolbar from './eventToolbar';

const GroupEventDetails = createReactClass({
displayName: 'GroupEventDetails',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import Reflux from 'reflux';

import {t} from 'app/locale';
import ApiMixin from 'app/mixins/apiMixin';
import MergedList from 'app/views/groupMerged/mergedList';
import GroupingActions from 'app/actions/groupingActions';
import GroupingStore from 'app/stores/groupingStore';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';

import MergedList from './mergedList';

const GroupMergedView = createReactClass({
displayName: 'GroupMergedView',
mixins: [ApiMixin, Reflux.listenTo(GroupingStore, 'onGroupingUpdate')],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import styled from 'react-emotion';
import {Panel} from 'app/components/panels';
import {t} from 'app/locale';
import EmptyStateWarning from 'app/components/emptyStateWarning';
import MergedItem from 'app/views/groupMerged/mergedItem';
import MergedToolbar from 'app/views/groupMerged/mergedToolbar';
import Pagination from 'app/components/pagination';
import QueryCount from 'app/components/queryCount';
import SentryTypes from 'app/sentryTypes';

import MergedItem from './mergedItem';
import MergedToolbar from './mergedToolbar';

class MergedList extends React.Component {
static propTypes = {
onUnmerge: PropTypes.func.isRequired,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import GroupingStore from 'app/stores/groupingStore';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';
import ProjectState from 'app/mixins/projectState';
import SimilarList from 'app/views/groupSimilar/similarList';
import SimilarList from './similarList';

const GroupGroupingView = createReactClass({
displayName: 'GroupGroupingView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import {Group} from 'app/sentryTypes';
import {t} from 'app/locale';
import Pagination from 'app/components/pagination';
import QueryCount from 'app/components/queryCount';
import SimilarItem from 'app/views/groupSimilar/similarItem';
import SimilarSpectrum from 'app/components/similarSpectrum';
import SimilarToolbar from 'app/views/groupSimilar/similarToolbar';
import SpreadLayout from 'app/components/spreadLayout';
import EmptyStateWarning from 'app/components/emptyStateWarning';
import {Panel} from 'app/components/panels';

import SimilarItem from './similarItem';
import SimilarToolbar from './similarToolbar';

const SimilarItemPropType = PropTypes.shape({
issue: Group,
score: PropTypes.object,
Expand Down
37 changes: 37 additions & 0 deletions src/sentry/static/sentry/app/views/groupDetails/project/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import PropTypes from 'prop-types';
import SentryTypes from 'app/sentryTypes';

import withEnvironment from 'app/utils/withEnvironment';
import {analytics} from 'app/utils/analytics';

import GroupDetails from '../shared/groupDetails';

class ProjectGroupDetails extends React.Component {
static propTypes = {
setProjectNavSection: PropTypes.func,
environment: SentryTypes.Environment,
};

static contextTypes = {
organization: SentryTypes.Organization,
project: SentryTypes.Project,
};

componentDidMount() {
this.props.setProjectNavSection('stream');
analytics('issue_page.viewed', {
group_id: parseInt(this.props.params.groupId, 10),
org_id: parseInt(this.context.organization.id, 10),
project_id: parseInt(this.context.project.id, 10),
});
}

render() {
// eslint-disable-next-line no-unused-vars
const {setProjectNavSection, ...props} = this.props;
return <GroupDetails {...props} />;
}
}

export default withEnvironment(ProjectGroupDetails);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const ERROR_TYPES = {
GROUP_NOT_FOUND: 'GROUP_NOT_FOUND',
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,30 @@ import Reflux from 'reflux';
import {browserHistory} from 'react-router';
import DocumentTitle from 'react-document-title';

import {analytics} from 'app/utils/analytics';
import ApiMixin from 'app/mixins/apiMixin';
import GroupHeader from 'app/views/groupDetails/header';
import GroupStore from 'app/stores/groupStore';
import LoadingError from 'app/components/loadingError';
import LoadingIndicator from 'app/components/loadingIndicator';
import SentryTypes from 'app/sentryTypes';
import {t} from 'app/locale';
import withEnvironment from 'app/utils/withEnvironment';

let ERROR_TYPES = {
GROUP_NOT_FOUND: 'GROUP_NOT_FOUND',
};
import GroupHeader from '../shared/header';
import {ERROR_TYPES} from '../shared/constants';

const GroupDetails = createReactClass({
displayName: 'GroupDetails',

propTypes: {
setProjectNavSection: PropTypes.func,
memberList: PropTypes.array,
environment: SentryTypes.Environment,
},

contextTypes: {
organization: SentryTypes.Organization,
project: SentryTypes.Project,
},

childContextTypes: {
group: SentryTypes.Group,
location: PropTypes.object,
},

mixins: [ApiMixin, Reflux.listenTo(GroupStore, 'onGroupChange')],

getDefaultProps() {
return {
memberList: [],
};
},

getInitialState() {
return {
group: null,
Expand All @@ -63,25 +46,16 @@ const GroupDetails = createReactClass({
},

componentWillMount() {
this.props.setProjectNavSection('stream');
this.fetchData();
},

componentDidMount() {
analytics('issue_page.viewed', {
group_id: parseInt(this.props.params.groupId, 10),
org_id: parseInt(this.context.organization.id, 10),
project_id: parseInt(this.context.project.id, 10),
});
},

componentWillReceiveProps(nextProps) {
if (nextProps.params.groupId !== this.props.params.groupId) {
this.remountComponent();
}
},

componentDidUpdate(prevProps, prevState) {
componentDidUpdate(prevProps) {
if (
prevProps.params.groupId !== this.props.params.groupId ||
prevProps.environment !== this.props.environment
Expand Down Expand Up @@ -212,14 +186,8 @@ const GroupDetails = createReactClass({
return (
<DocumentTitle title={this.getTitle()}>
<div className={this.props.className}>
<GroupHeader
orgId={params.orgId}
projectId={params.projectId}
group={group}
memberList={this.props.memberList}
/>
<GroupHeader orgId={params.orgId} projectId={group.project.id} group={group} />
{React.cloneElement(this.props.children, {
memberList: this.props.memberList,
group,
})}
</div>
Expand All @@ -228,4 +196,4 @@ const GroupDetails = createReactClass({
},
});

export default withEnvironment(GroupDetails);
export default GroupDetails;
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import {Link} from 'react-router';
import ApiMixin from 'app/mixins/apiMixin';
import AssigneeSelector from 'app/components/assigneeSelector';
import Count from 'app/components/count';
import GroupActions from 'app/views/groupDetails/actions';
import GroupSeenBy from 'app/views/groupDetails/seenBy';
import GroupActions from 'app/views/groupDetails/project/actions';
import IndicatorStore from 'app/stores/indicatorStore';
import ListLink from 'app/components/listLink';
import NavTabs from 'app/components/navTabs';
Expand All @@ -17,6 +16,8 @@ import ProjectState from 'app/mixins/projectState';
import Tooltip from 'app/components/tooltip';
import {t} from 'app/locale';

import GroupSeenBy from '../project/seenBy';

const GroupHeader = createReactClass({
displayName: 'GroupHeader',

Expand Down
2 changes: 1 addition & 1 deletion tests/js/spec/views/groupActivity/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {shallow} from 'enzyme';

import GroupActivity from 'app/views/groupActivity';
import GroupActivity from 'app/views/groupDetails/project/groupActivity';
import NoteInput from 'app/components/activity/noteInput';
import ConfigStore from 'app/stores/configStore';
import GroupStore from 'app/stores/groupStore';
Expand Down
2 changes: 1 addition & 1 deletion tests/js/spec/views/groupDetails/actions.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {shallow} from 'enzyme';

import GroupActions from 'app/views/groupDetails/actions';
import GroupActions from 'app/views/groupDetails/project/actions';
import ConfigStore from 'app/stores/configStore';

describe('GroupActions', function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import {shallow} from 'enzyme';
import {browserHistory} from 'react-router';

import {GroupEvents} from 'app/views/groupEvents';
import {GroupEvents} from 'app/views/groupDetails/project/groupEvents';

describe('groupEvents', function() {
beforeEach(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import PropTypes from 'prop-types';

import {shallow} from 'enzyme';

import GroupMergedView from 'app/views/groupMerged/groupMergedView';
import GroupMergedView from 'app/views/groupDetails/project/groupMerged';
import {Client} from 'app/api';
import events from '../../mocks/events';
import events from 'app-test/mocks/events';

jest.mock('app/api');
jest.mock('app/mixins/projectState', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {browserHistory} from 'react-router';
import React from 'react';

import {mount, shallow} from 'enzyme';
import GroupSimilarView from 'app/views/groupSimilar/groupSimilarView';
import GroupSimilarView from 'app/views/groupDetails/project/groupSimilar';

import issues from '../../mocks/issues';
import issues from 'app-test/mocks/issues';

jest.mock('app/mixins/projectState', () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion tests/js/spec/views/groupDetails/seenBy.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {shallow} from 'enzyme';

import GroupSeenBy from 'app/views/groupDetails/seenBy';
import GroupSeenBy from 'app/views/groupDetails/project/seenBy';
import ConfigStore from 'app/stores/configStore';

describe('GroupSeenBy', function() {
Expand Down