Skip to content

Commit

Permalink
feat(uptime): Restrict uptime creation on frontend via flag
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Jan 27, 2025
1 parent 5ef3a54 commit 9fe9123
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/app/views/alerts/wizard/options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ export const getAlertWizardCategories = (org: Organization) => {
],
});

if (org.features.includes('uptime')) {
if (
org.features.includes('uptime') &&
!org.features.includes('uptime-create-disabled')
) {
result.push({
categoryHeading: t('Uptime Monitoring'),
options: ['uptime_monitor'],
Expand Down
10 changes: 10 additions & 0 deletions static/app/views/insights/uptime/views/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,23 @@ export default function UptimeOverview() {
});
};

const creationDisabled = organization.features.includes('uptime-create-disabled');

return (
<ModulePageProviders moduleName="uptime" pageTitle={t('Overview')}>
<BackendHeader
module={ModuleName.UPTIME}
headerActions={
<ButtonBar gap={1}>
<LinkButton
disabled={creationDisabled}
title={
creationDisabled
? t(
'Creation of new uptime alerts is temporarily disabled as the beta has ended. Alert creation will be available again in a few days.'
)
: undefined
}
size="sm"
priority="primary"
to={`/organizations/${organization.slug}/alerts/new/uptime/`}
Expand Down

0 comments on commit 9fe9123

Please sign in to comment.