|
@@ -1,12 +1,9 @@
|
|
|
-// XXX: A lot of the UI for this file will be changed once we use IssueListActions
|
|
|
-// We're using GroupList to help us iterate quickly
|
|
|
+import {Fragment} from 'react';
|
|
|
import type {RouteComponentProps} from 'react-router';
|
|
|
import styled from '@emotion/styled';
|
|
|
|
|
|
-import Feature from 'sentry/components/acl/feature';
|
|
|
import {LinkButton} from 'sentry/components/button';
|
|
|
import GroupList from 'sentry/components/issues/groupList';
|
|
|
-import * as Layout from 'sentry/components/layouts/thirds';
|
|
|
import Link from 'sentry/components/links/link';
|
|
|
import LoadingError from 'sentry/components/loadingError';
|
|
|
import LoadingIndicator from 'sentry/components/loadingIndicator';
|
|
@@ -70,107 +67,90 @@ function GroupRelatedIssues({params}: Props) {
|
|
|
);
|
|
|
|
|
|
return (
|
|
|
- <Layout.Body>
|
|
|
- <Layout.Main fullWidth>
|
|
|
- <HeaderWrapper>
|
|
|
- <small>
|
|
|
- {t(
|
|
|
- 'Related Issues are issues that are related in some way and can be acted on together.'
|
|
|
- )}
|
|
|
- </small>
|
|
|
- </HeaderWrapper>
|
|
|
- {isLoading ? (
|
|
|
- <LoadingIndicator />
|
|
|
- ) : isError ? (
|
|
|
- <LoadingError
|
|
|
- message={t('Unable to load related issues, please try again later')}
|
|
|
- onRetry={refetch}
|
|
|
- />
|
|
|
- ) : (
|
|
|
+ <Fragment>
|
|
|
+ {isLoading ? (
|
|
|
+ <LoadingIndicator />
|
|
|
+ ) : isError ? (
|
|
|
+ <LoadingError
|
|
|
+ message={t('Unable to load related issues, please try again later')}
|
|
|
+ onRetry={refetch}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <Fragment>
|
|
|
<div>
|
|
|
- <div>
|
|
|
- <HeaderWrapper>
|
|
|
- <Title>{t('Issues caused by the same root cause')}</Title>
|
|
|
- {sameRootCauseIssues.length > 0 ? (
|
|
|
- <div>
|
|
|
- <TextButtonWrapper>
|
|
|
- <div />
|
|
|
- <LinkButton
|
|
|
- to={`/organizations/${orgSlug}/issues/?query=issue.id:[${groupId},${sameRootCauseIssues}]`}
|
|
|
- size="xs"
|
|
|
- >
|
|
|
- {t('Open in Issues')}
|
|
|
- </LinkButton>
|
|
|
- </TextButtonWrapper>
|
|
|
- <GroupList
|
|
|
- endpointPath={`/organizations/${orgSlug}/issues/`}
|
|
|
- orgSlug={orgSlug}
|
|
|
- queryParams={{query: `issue.id:[${sameRootCauseIssues}]`}}
|
|
|
- query=""
|
|
|
- source="related-issues-tab"
|
|
|
- canSelectGroups={false}
|
|
|
- withChart={false}
|
|
|
- />
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- <small>{t('No same-root-cause related issues were found.')}</small>
|
|
|
- )}
|
|
|
- </HeaderWrapper>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <HeaderWrapper>
|
|
|
- <Title>{t('Trace connected issues')}</Title>
|
|
|
- {traceConnectedIssues.length > 0 ? (
|
|
|
- <div>
|
|
|
- <TextButtonWrapper>
|
|
|
- <small>
|
|
|
- {t('These are the issues belonging to ')}
|
|
|
- <Link
|
|
|
- to={`/organizations/${orgSlug}/performance/trace/${traceMeta.trace_id}/?node=error-${traceMeta.event_id}`}
|
|
|
- >
|
|
|
- {t('this trace')}
|
|
|
- </Link>
|
|
|
- </small>
|
|
|
- <LinkButton
|
|
|
- to={`/organizations/${orgSlug}/issues/?query=trace:${traceMeta.trace_id}`}
|
|
|
- size="xs"
|
|
|
+ <HeaderWrapper>
|
|
|
+ <Title>{t('Issues caused by the same root cause')}</Title>
|
|
|
+ {sameRootCauseIssues.length > 0 ? (
|
|
|
+ <div>
|
|
|
+ <TextButtonWrapper>
|
|
|
+ <div />
|
|
|
+ <LinkButton
|
|
|
+ to={`/organizations/${orgSlug}/issues/?query=issue.id:[${groupId},${sameRootCauseIssues}]`}
|
|
|
+ size="xs"
|
|
|
+ >
|
|
|
+ {t('Open in Issues')}
|
|
|
+ </LinkButton>
|
|
|
+ </TextButtonWrapper>
|
|
|
+ <GroupList
|
|
|
+ endpointPath={`/organizations/${orgSlug}/issues/`}
|
|
|
+ orgSlug={orgSlug}
|
|
|
+ queryParams={{query: `issue.id:[${sameRootCauseIssues}]`}}
|
|
|
+ query=""
|
|
|
+ source="related-issues-tab"
|
|
|
+ canSelectGroups={false}
|
|
|
+ withChart={false}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ <small>{t('No same-root-cause related issues were found.')}</small>
|
|
|
+ )}
|
|
|
+ </HeaderWrapper>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <HeaderWrapper>
|
|
|
+ <Title>{t('Issues in the same trace')}</Title>
|
|
|
+ {traceConnectedIssues.length > 0 ? (
|
|
|
+ <div>
|
|
|
+ <TextButtonWrapper>
|
|
|
+ <small>
|
|
|
+ {t('These issues were all found within ')}
|
|
|
+ <Link
|
|
|
+ to={`/organizations/${orgSlug}/performance/trace/${traceMeta.trace_id}/?node=error-${traceMeta.event_id}`}
|
|
|
>
|
|
|
- {t('Open in Issues')}
|
|
|
- </LinkButton>
|
|
|
- </TextButtonWrapper>
|
|
|
- <GroupList
|
|
|
- endpointPath={`/organizations/${orgSlug}/issues/`}
|
|
|
- orgSlug={orgSlug}
|
|
|
- queryParams={{query: `issue.id:[${traceConnectedIssues}]`}}
|
|
|
- query=""
|
|
|
- source="related-issues-tab"
|
|
|
- canSelectGroups={false}
|
|
|
- withChart={false}
|
|
|
- />
|
|
|
- </div>
|
|
|
- ) : (
|
|
|
- <small>{t('No trace-connected related issues were found.')}</small>
|
|
|
- )}
|
|
|
- </HeaderWrapper>
|
|
|
- </div>
|
|
|
+ {t('this trace')}
|
|
|
+ </Link>
|
|
|
+ .
|
|
|
+ </small>
|
|
|
+ <LinkButton
|
|
|
+ to={`/organizations/${orgSlug}/issues/?query=trace:${traceMeta.trace_id}`}
|
|
|
+ size="xs"
|
|
|
+ >
|
|
|
+ {t('Open in Issues')}
|
|
|
+ </LinkButton>
|
|
|
+ </TextButtonWrapper>
|
|
|
+ <GroupList
|
|
|
+ endpointPath={`/organizations/${orgSlug}/issues/`}
|
|
|
+ orgSlug={orgSlug}
|
|
|
+ queryParams={{query: `issue.id:[${traceConnectedIssues}]`}}
|
|
|
+ query=""
|
|
|
+ source="related-issues-tab"
|
|
|
+ canSelectGroups={false}
|
|
|
+ withChart={false}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ <small>{t('No trace-connected related issues were found.')}</small>
|
|
|
+ )}
|
|
|
+ </HeaderWrapper>
|
|
|
</div>
|
|
|
- )}
|
|
|
- </Layout.Main>
|
|
|
- </Layout.Body>
|
|
|
- );
|
|
|
-}
|
|
|
-
|
|
|
-function GroupRelatedIssuesWrapper(props: Props) {
|
|
|
- return (
|
|
|
- <Feature features={['related-issues']}>
|
|
|
- <GroupRelatedIssues {...props} />
|
|
|
- </Feature>
|
|
|
+ </Fragment>
|
|
|
+ )}
|
|
|
+ </Fragment>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
// Export the component without feature flag controls
|
|
|
export {GroupRelatedIssues};
|
|
|
-export default GroupRelatedIssuesWrapper;
|
|
|
|
|
|
const Title = styled('h4')`
|
|
|
margin-bottom: ${space(0.75)};
|