import {Fragment} from 'react'; import styled from '@emotion/styled'; import List from 'sentry/components/list'; import ListItem from 'sentry/components/list/listItem'; import {IconBusiness} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import type {Organization} from 'sentry/types/organization'; import type {Subscription} from 'getsentry/types'; import {displayPlanName, hasPerformance} from 'getsentry/utils/billing'; import withSubscription from '../withSubscription'; import AlertsBackground from './illustrations/alertsBackground'; import PageUpsellOverlay from './pageUpsellOverlay'; import PlanFeature from './planFeature'; type Props = React.PropsWithChildren<{ features: string[]; organization: Organization; subscription: Subscription; }>; const TextWrapper = styled('div')` width: 550px; `; function DisabledAlertsPage({ organization, subscription, features, children: _children, ...props }: Props) { const requiredPlan = tct(`You'll need a [plan] or up to view metric alerts.`, { plan: ( {({plan}) => ( {t('%s Plan', displayPlanName(plan))} )} ), }); const description = (

{t( 'Sure, we like attention as much as the next app. But we don’t want to send notifications you don’t need. Set your own alert rules.' )}

}> {t('Set critical thresholds')} {t('Automate resolution')} {t('Identify key events to watch')} {t('Create custom triggers')}
); return ( { // Vertically center within the anchor const y = (anchorRect.height - wrapperRect.height + 40) / 2 + anchorRect.y - mainRect.y; // Align to the right of the anchor, avoid overflowing outside of the // page, the best we can do is start to overlap the illustration at // this point. let x = anchorRect.x - mainRect.x - wrapperRect.width; x = x < 30 ? 30 : x; return {x, y}; }} {...props} /> ); } const FeatureList = styled(List)` display: grid; grid-template-columns: 1fr 1fr; `; export default withSubscription(DisabledAlertsPage);