Skip to content

Commit d465403

Browse files
use beta badge and update to feature flag check
1 parent a42668e commit d465403

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

static/app/views/dashboards/manage/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {openImportDashboardFromFileModal} from 'sentry/actionCreators/modal';
2020
import Feature from 'sentry/components/acl/feature';
2121
import {DropdownMenu} from 'sentry/components/dropdownMenu';
2222
import {ErrorBoundary} from 'sentry/components/errorBoundary';
23+
import {useOrganizationSeerSetup} from 'sentry/components/events/autofix/useOrganizationSeerSetup';
2324
import {FeedbackButton} from 'sentry/components/feedbackButton/feedbackButton';
2425
import * as Layout from 'sentry/components/layouts/thirds';
2526
import {NoProjectMessage} from 'sentry/components/noProjectMessage';
@@ -170,6 +171,8 @@ function ManageDashboards() {
170171
const isOnlyPrebuilt =
171172
hasPrebuiltDashboards && urlFilter === DashboardFilter.ONLY_PREBUILT;
172173

174+
const {areAiFeaturesAllowed} = useOrganizationSeerSetup();
175+
173176
const [showTemplates, setShowTemplatesLocal] = useLocalStorageState(
174177
SHOW_TEMPLATES_KEY,
175178
shouldShowTemplates()
@@ -655,9 +658,9 @@ function ManageDashboards() {
655658
)}
656659

657660
<FeedbackButton />
658-
<Feature features="dashboards-ai-generate">
661+
<Feature features={['dashboards-ai-generate']}>
659662
{({hasFeature: hasAiGenerate}) =>
660-
hasAiGenerate ? (
663+
hasAiGenerate && areAiFeaturesAllowed ? (
661664
<DashboardCreateLimitWrapper>
662665
{({
663666
hasReachedDashboardLimit,
@@ -680,7 +683,7 @@ function ManageDashboards() {
680683
label: (
681684
<Flex gap="sm" align="center" as="span">
682685
{t('Generate dashboard')}
683-
<FeatureBadge type="experimental" />
686+
<FeatureBadge type="beta" />
684687
</Flex>
685688
),
686689
onAction: () => onGenerateDashboard(),

0 commit comments

Comments
 (0)