Skip to content

Commit e614aca

Browse files
committed
Add setup promps to empty states
1 parent 69ba9fa commit e614aca

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

static/app/views/issueList/noGroupsHandler/noIssuesMatched.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ import {navigateTo} from 'sentry/actionCreators/navigation';
66
import ExternalLink from 'sentry/components/links/externalLink';
77
import {t, tct} from 'sentry/locale';
88
import {space} from 'sentry/styles/space';
9+
import {useLocation} from 'sentry/utils/useLocation';
910
import useOrganization from 'sentry/utils/useOrganization';
1011
import useRouter from 'sentry/utils/useRouter';
1112

1213
function NoIssuesMatched() {
1314
const organization = useOrganization();
1415
const router = useRouter();
16+
17+
const location = useLocation();
18+
const onBreachedMetricsView = location.pathname.endsWith('/issues/breached-metrics/');
19+
const onWarningsView = location.pathname.endsWith('/issues/warnings/');
20+
const onErrorsAndOutagesView = location.pathname.endsWith('/issues/errors-outages/');
21+
1522
return (
1623
<Wrapper data-test-id="empty-state" className="empty-state">
1724
<img src={campingImg} alt="Camping spot illustration" height={200} />
@@ -48,6 +55,28 @@ function NoIssuesMatched() {
4855
}
4956
)}
5057
</li>
58+
{(onBreachedMetricsView || onWarningsView) && (
59+
<li>
60+
{tct('Make sure tracing is set up in your project. [link]', {
61+
link: (
62+
<ExternalLink href="https://docs.sentry.io/platform-redirect/?next=%2Ftracing%2F">
63+
{t('Learn more')}
64+
</ExternalLink>
65+
),
66+
})}
67+
</li>
68+
)}
69+
{onErrorsAndOutagesView && (
70+
<li>
71+
{tct('Make sure uptime monitoring is set up in your project. [link]', {
72+
link: (
73+
<ExternalLink href="https://docs.sentry.io/product/alerts/uptime-monitoring/">
74+
{t('Learn more')}
75+
</ExternalLink>
76+
),
77+
})}
78+
</li>
79+
)}
5180
</Tips>
5281
</MessageContainer>
5382
</Wrapper>

0 commit comments

Comments
 (0)