From 27b70ed1974b2e8d300fd432344c7578724fae22 Mon Sep 17 00:00:00 2001 From: Lyn Nagara Date: Tue, 11 Jun 2019 08:48:18 -0700 Subject: [PATCH] ref(sentry10): Remove non Sentry 10 paths from group details --- .../app/views/organizationGroupDetails/groupDetails.jsx | 4 ++-- .../views/organizationGroupDetails/groupSimilar/index.jsx | 7 +++---- .../app/views/organizationGroupDetails/groupTags.jsx | 7 ++----- .../sentry/app/views/organizationGroupDetails/header.jsx | 7 ++----- .../views/organizationGroupDetails/groupSimilar.spec.jsx | 2 +- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/sentry/static/sentry/app/views/organizationGroupDetails/groupDetails.jsx b/src/sentry/static/sentry/app/views/organizationGroupDetails/groupDetails.jsx index a07ad99aa5b1c2..325581a188778a 100644 --- a/src/sentry/static/sentry/app/views/organizationGroupDetails/groupDetails.jsx +++ b/src/sentry/static/sentry/app/views/organizationGroupDetails/groupDetails.jsx @@ -203,13 +203,13 @@ const GroupDetails = createReactClass({ }, renderContent(shouldShowGlobalHeader) { - const {params, environments} = this.props; + const {environments} = this.props; const {group, project} = this.state; const Content = (
- + {React.cloneElement(this.props.children, { environments, group, diff --git a/src/sentry/static/sentry/app/views/organizationGroupDetails/groupSimilar/index.jsx b/src/sentry/static/sentry/app/views/organizationGroupDetails/groupSimilar/index.jsx index b57ceca2b38f8b..96838fcef51a29 100644 --- a/src/sentry/static/sentry/app/views/organizationGroupDetails/groupSimilar/index.jsx +++ b/src/sentry/static/sentry/app/views/organizationGroupDetails/groupSimilar/index.jsx @@ -66,10 +66,9 @@ const GroupGroupingView = createReactClass({ } else if (mergedParent && mergedParent !== this.props.params.groupId) { const {params} = this.props; // Merge success, since we can't specify target, we need to redirect to new parent - const baseUrl = params.projectId - ? `/${params.orgId}/${params.projectId}/issues/` - : `/organizations/${params.orgId}/issues/`; - browserHistory.push(`${baseUrl}${mergedParent}/similar/`); + browserHistory.push( + `/organizations/${params.orgId}/issues/${mergedParent}/similar/` + ); } }, diff --git a/src/sentry/static/sentry/app/views/organizationGroupDetails/groupTags.jsx b/src/sentry/static/sentry/app/views/organizationGroupDetails/groupTags.jsx index efeb50c474be19..15b0857b41051e 100644 --- a/src/sentry/static/sentry/app/views/organizationGroupDetails/groupTags.jsx +++ b/src/sentry/static/sentry/app/views/organizationGroupDetails/groupTags.jsx @@ -20,7 +20,6 @@ class GroupTags extends React.Component { organization: SentryTypes.Organization.isRequired, group: SentryTypes.Group.isRequired, api: PropTypes.object.isRequired, - params: PropTypes.object.isRequired, }; constructor() { @@ -65,13 +64,11 @@ class GroupTags extends React.Component { } render() { - const {group, organization, params} = this.props; + const {group, organization} = this.props; let children = []; - const baseUrl = params.projectId - ? `/${organization.slug}/${group.project.slug}/issues/` - : `/organizations/${organization.slug}/issues/`; + const baseUrl = `/organizations/${organization.slug}/issues/`; if (this.state.loading) { return ; diff --git a/src/sentry/static/sentry/app/views/organizationGroupDetails/header.jsx b/src/sentry/static/sentry/app/views/organizationGroupDetails/header.jsx index 9703f9ab692bc3..ec34e040fd6e02 100644 --- a/src/sentry/static/sentry/app/views/organizationGroupDetails/header.jsx +++ b/src/sentry/static/sentry/app/views/organizationGroupDetails/header.jsx @@ -31,7 +31,6 @@ const GroupHeader = createReactClass({ api: PropTypes.object, group: SentryTypes.Group.isRequired, project: SentryTypes.Project, - params: PropTypes.object, }, contextTypes: { @@ -91,7 +90,7 @@ const GroupHeader = createReactClass({ }, render() { - const {project, group, params} = this.props; + const {project, group} = this.props; const projectFeatures = new Set(project ? project.features : []); const userCount = group.userCount; @@ -118,9 +117,7 @@ const GroupHeader = createReactClass({ const hasSimilarView = projectFeatures.has('similarity-view'); - const baseUrl = params.projectId - ? `/${orgId}/${params.projectId}/issues/` - : `/organizations/${orgId}/issues/`; + const baseUrl = `/organizations/${orgId}/issues/`; const searchTermWithoutQuery = omit(location.query, 'query'); const eventRouteToObject = { diff --git a/tests/js/spec/views/organizationGroupDetails/groupSimilar.spec.jsx b/tests/js/spec/views/organizationGroupDetails/groupSimilar.spec.jsx index 92e32ebb024fe2..f598c1a6a72a45 100644 --- a/tests/js/spec/views/organizationGroupDetails/groupSimilar.spec.jsx +++ b/tests/js/spec/views/organizationGroupDetails/groupSimilar.spec.jsx @@ -111,7 +111,7 @@ describe('Issues Similar View', function() { ); expect(browserHistory.push).toHaveBeenCalledWith( - '/org-slug/project-slug/issues/321/similar/' + '/organizations/org-slug/issues/321/similar/' ); }); });