|
@@ -15,7 +15,10 @@ import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
|
|
|
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
|
|
|
import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
|
|
|
import Pagination from 'sentry/components/pagination';
|
|
|
-import {ProfilingBetaAlertBanner} from 'sentry/components/profiling/billing/alerts';
|
|
|
+import {
|
|
|
+ ProfilingBetaAlertBanner,
|
|
|
+ ProfilingUpgradeButton,
|
|
|
+} from 'sentry/components/profiling/billing/alerts';
|
|
|
import {ProfileEventsTable} from 'sentry/components/profiling/profileEventsTable';
|
|
|
import ProjectPageFilter from 'sentry/components/projectPageFilter';
|
|
|
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
|
|
@@ -177,9 +180,23 @@ function ProfilingContent({location}: ProfilingContentProps) {
|
|
|
</Layout.HeaderContent>
|
|
|
<Layout.HeaderActions>
|
|
|
<ButtonBar gap={1}>
|
|
|
- <Button size="sm" onClick={onSetupProfilingClick}>
|
|
|
- {t('Set Up Profiling')}
|
|
|
- </Button>
|
|
|
+ {isProfilingGA ? (
|
|
|
+ <ProfilingUpgradeButton
|
|
|
+ organization={organization}
|
|
|
+ size="sm"
|
|
|
+ fallback={
|
|
|
+ <Button onClick={onSetupProfilingClick} priority="primary">
|
|
|
+ {t('Set Up Profiling')}
|
|
|
+ </Button>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {t('Upgrade plan')}
|
|
|
+ </ProfilingUpgradeButton>
|
|
|
+ ) : (
|
|
|
+ <Button size="sm" onClick={onSetupProfilingClick}>
|
|
|
+ {t('Set Up Profiling')}
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
<Button
|
|
|
size="sm"
|
|
|
priority="primary"
|
|
@@ -232,9 +249,23 @@ function ProfilingContent({location}: ProfilingContentProps) {
|
|
|
</ActionBar>
|
|
|
{shouldShowProfilingOnboardingPanel ? (
|
|
|
<ProfilingOnboardingPanel>
|
|
|
- <Button onClick={onSetupProfilingClick} priority="primary">
|
|
|
- {t('Set Up Profiling')}
|
|
|
- </Button>
|
|
|
+ {isProfilingGA ? (
|
|
|
+ <ProfilingUpgradeButton
|
|
|
+ organization={organization}
|
|
|
+ priority="primary"
|
|
|
+ fallback={
|
|
|
+ <Button onClick={onSetupProfilingClick} priority="primary">
|
|
|
+ {t('Set Up Profiling')}
|
|
|
+ </Button>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {t('Upgrade plan')}
|
|
|
+ </ProfilingUpgradeButton>
|
|
|
+ ) : (
|
|
|
+ <Button onClick={onSetupProfilingClick} priority="primary">
|
|
|
+ {t('Set Up Profiling')}
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
<Button href="https://docs.sentry.io/product/profiling/" external>
|
|
|
{t('Read Docs')}
|
|
|
</Button>
|