Skip to content

Commit 6c03a42

Browse files
ref(layout): use Layout.Page on issue alert details
Wrap the issue alert rule details page with Layout.Page, consistent with the other alert pages updated in the prior commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b6777a6 commit 6c03a42

File tree

1 file changed

+126
-124
lines changed

1 file changed

+126
-124
lines changed

static/app/views/alerts/rules/issue/details/ruleDetails.tsx

Lines changed: 126 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -383,139 +383,141 @@ export default function AlertRuleDetails() {
383383
const {period, start, end, utc} = getDataDatetime();
384384
const cursor = decodeScalar(location.query.cursor);
385385
return (
386-
<PageFiltersContainer
387-
skipInitializeUrlParams
388-
skipLoadLastUsed
389-
shouldForceProject
390-
forceProject={project}
391-
>
392-
<SentryDocumentTitle
393-
title={rule.name}
394-
orgSlug={organization.slug}
395-
projectSlug={projectSlug}
396-
/>
397-
398-
<Layout.Header>
399-
<Layout.HeaderContent>
400-
<Breadcrumbs
401-
crumbs={[
402-
{
403-
label: t('Alerts'),
404-
to: makeAlertsPathname({
405-
path: `/rules/`,
406-
organization,
407-
}),
408-
},
409-
{
410-
label: t('Issue Alert'),
411-
},
412-
]}
413-
/>
414-
<Layout.Title>
415-
<IdBadge
416-
project={project}
417-
avatarSize={28}
418-
hideName
419-
avatarProps={{hasTooltip: true, tooltip: project.slug}}
386+
<Layout.Page>
387+
<PageFiltersContainer
388+
skipInitializeUrlParams
389+
skipLoadLastUsed
390+
shouldForceProject
391+
forceProject={project}
392+
>
393+
<SentryDocumentTitle
394+
title={rule.name}
395+
orgSlug={organization.slug}
396+
projectSlug={projectSlug}
397+
/>
398+
399+
<Layout.Header>
400+
<Layout.HeaderContent>
401+
<Breadcrumbs
402+
crumbs={[
403+
{
404+
label: t('Alerts'),
405+
to: makeAlertsPathname({
406+
path: `/rules/`,
407+
organization,
408+
}),
409+
},
410+
{
411+
label: t('Issue Alert'),
412+
},
413+
]}
420414
/>
421-
{rule.name}
422-
</Layout.Title>
423-
</Layout.HeaderContent>
424-
<Layout.HeaderActions>
425-
<Grid flow="column" align="center" gap="md">
426-
<Access access={['alerts:write']}>
427-
{({hasAccess}) => (
428-
<SnoozeAlert
429-
isSnoozed={rule.snoozeForEveryone ?? false}
430-
onSnooze={onSnooze}
431-
ruleId={rule.id}
432-
projectSlug={projectSlug}
433-
hasAccess={hasAccess}
434-
type="issue"
435-
disabled={rule.status === 'disabled'}
436-
/>
437-
)}
438-
</Access>
439-
<LinkButton
440-
size="sm"
441-
icon={<IconCopy />}
442-
to={duplicateLink}
443-
disabled={rule.status === 'disabled'}
444-
>
445-
{t('Duplicate')}
446-
</LinkButton>
447-
<LinkButton
448-
size="sm"
449-
icon={<IconEdit />}
450-
to={makeAlertsPathname({
451-
path: `/rules/${projectSlug}/${ruleId}/`,
452-
organization,
453-
})}
454-
onClick={() =>
455-
trackAnalytics('issue_alert_rule_details.edit_clicked', {
415+
<Layout.Title>
416+
<IdBadge
417+
project={project}
418+
avatarSize={28}
419+
hideName
420+
avatarProps={{hasTooltip: true, tooltip: project.slug}}
421+
/>
422+
{rule.name}
423+
</Layout.Title>
424+
</Layout.HeaderContent>
425+
<Layout.HeaderActions>
426+
<Grid flow="column" align="center" gap="md">
427+
<Access access={['alerts:write']}>
428+
{({hasAccess}) => (
429+
<SnoozeAlert
430+
isSnoozed={rule.snoozeForEveryone ?? false}
431+
onSnooze={onSnooze}
432+
ruleId={rule.id}
433+
projectSlug={projectSlug}
434+
hasAccess={hasAccess}
435+
type="issue"
436+
disabled={rule.status === 'disabled'}
437+
/>
438+
)}
439+
</Access>
440+
<LinkButton
441+
size="sm"
442+
icon={<IconCopy />}
443+
to={duplicateLink}
444+
disabled={rule.status === 'disabled'}
445+
>
446+
{t('Duplicate')}
447+
</LinkButton>
448+
<LinkButton
449+
size="sm"
450+
icon={<IconEdit />}
451+
to={makeAlertsPathname({
452+
path: `/rules/${projectSlug}/${ruleId}/`,
456453
organization,
457-
rule_id: parseInt(ruleId, 10),
458-
})
459-
}
460-
>
461-
{rule.status === 'disabled' ? t('Edit to enable') : t('Edit Rule')}
462-
</LinkButton>
463-
</Grid>
464-
</Layout.HeaderActions>
465-
</Layout.Header>
466-
<Layout.Body>
467-
<Layout.Main>
468-
<APIUsageWarningBanner errors={rule.errors} />
469-
{renderIncompatibleAlert()}
470-
{renderDisabledAlertBanner()}
471-
{rule.snooze && (
472-
<Alert.Container>
473-
{rule.snoozeForEveryone ? (
474-
<Alert variant="info">
475-
{tct(
476-
"[creator] muted this alert for everyone so you won't get these notifications in the future.",
477-
{
478-
creator: rule.snoozeCreatedBy,
479-
}
480-
)}
481-
</Alert>
482-
) : (
483-
<UserSnoozeDeprecationBanner projectId={project.id} />
484-
)}
485-
</Alert.Container>
486-
)}
487-
<StyledTimeRangeSelector
488-
relative={period ?? ''}
489-
start={start ?? null}
490-
end={end ?? null}
491-
utc={utc ?? null}
492-
onChange={handleUpdateDatetime}
493-
/>
494-
<ErrorBoundary>
495-
<IssueAlertDetailsChart
454+
})}
455+
onClick={() =>
456+
trackAnalytics('issue_alert_rule_details.edit_clicked', {
457+
organization,
458+
rule_id: parseInt(ruleId, 10),
459+
})
460+
}
461+
>
462+
{rule.status === 'disabled' ? t('Edit to enable') : t('Edit Rule')}
463+
</LinkButton>
464+
</Grid>
465+
</Layout.HeaderActions>
466+
</Layout.Header>
467+
<Layout.Body>
468+
<Layout.Main>
469+
<APIUsageWarningBanner errors={rule.errors} />
470+
{renderIncompatibleAlert()}
471+
{renderDisabledAlertBanner()}
472+
{rule.snooze && (
473+
<Alert.Container>
474+
{rule.snoozeForEveryone ? (
475+
<Alert variant="info">
476+
{tct(
477+
"[creator] muted this alert for everyone so you won't get these notifications in the future.",
478+
{
479+
creator: rule.snoozeCreatedBy,
480+
}
481+
)}
482+
</Alert>
483+
) : (
484+
<UserSnoozeDeprecationBanner projectId={project.id} />
485+
)}
486+
</Alert.Container>
487+
)}
488+
<StyledTimeRangeSelector
489+
relative={period ?? ''}
490+
start={start ?? null}
491+
end={end ?? null}
492+
utc={utc ?? null}
493+
onChange={handleUpdateDatetime}
494+
/>
495+
<ErrorBoundary>
496+
<IssueAlertDetailsChart
497+
project={project}
498+
rule={rule}
499+
period={period ?? ''}
500+
start={start ?? null}
501+
end={end ?? null}
502+
utc={utc ?? null}
503+
/>
504+
</ErrorBoundary>
505+
<AlertRuleIssuesList
496506
project={project}
497507
rule={rule}
498508
period={period ?? ''}
499509
start={start ?? null}
500510
end={end ?? null}
501511
utc={utc ?? null}
512+
cursor={cursor}
502513
/>
503-
</ErrorBoundary>
504-
<AlertRuleIssuesList
505-
project={project}
506-
rule={rule}
507-
period={period ?? ''}
508-
start={start ?? null}
509-
end={end ?? null}
510-
utc={utc ?? null}
511-
cursor={cursor}
512-
/>
513-
</Layout.Main>
514-
<Layout.Side>
515-
<Sidebar rule={rule} projectSlug={project.slug} teams={project.teams} />
516-
</Layout.Side>
517-
</Layout.Body>
518-
</PageFiltersContainer>
514+
</Layout.Main>
515+
<Layout.Side>
516+
<Sidebar rule={rule} projectSlug={project.slug} teams={project.teams} />
517+
</Layout.Side>
518+
</Layout.Body>
519+
</PageFiltersContainer>
520+
</Layout.Page>
519521
);
520522
}
521523

0 commit comments

Comments
 (0)