Properly respect flags.disableEnterpriseFeatures

This commit is contained in:
Owen
2026-05-06 16:13:07 -07:00
parent ac0d88d9b7
commit 998364b09d
4 changed files with 28 additions and 18 deletions

View File

@@ -217,15 +217,17 @@ export const orgNavSections = (
{
title: "sidebarAlerting",
href: "/{orgId}/settings/alerting",
icon: <BellRing className="size-4 flex-none" />
icon: (
<BellRing className="size-4 flex-none" />
)
},
{
title: "sidebarProvisioning",
href: "/{orgId}/settings/provisioning",
icon: <Boxes className="size-4 flex-none" />
}
]
: []),
{
title: "sidebarProvisioning",
href: "/{orgId}/settings/provisioning",
icon: <Boxes className="size-4 flex-none" />
},
{
title: "sidebarBluePrints",
href: "/{orgId}/settings/blueprints",

View File

@@ -840,12 +840,16 @@ export function InternalResourceForm({
modeCidrKey
)
},
{
value: "http",
label: t(
modeHttpKey
)
}
...(!disableEnterpriseFeatures
? [
{
value: "http" as const,
label: t(
modeHttpKey
)
}
]
: [])
];
return (
<FormItem>

View File

@@ -53,10 +53,12 @@ export default function UptimeAlertSection({
days = 90
}: UptimeAlertSectionProps) {
const t = useTranslations();
const api = createApiClient(useEnvContext());
const envContext = useEnvContext();
const api = createApiClient(envContext);
const queryClient = useQueryClient();
const { isPaidUser } = usePaidStatus();
const isPaid = isPaidUser(tierMatrix.alertingRules);
const { env } = envContext;
const [open, setOpen] = useState(false);
const [name, setName] = useState(
@@ -176,7 +178,9 @@ export default function UptimeAlertSection({
{t("uptimeSectionDescription", { days })}
</SettingsSectionDescription>
</div>
{alertButton}
{!env.flags.disableEnterpriseFeatures
? alertButton
: null}
</div>
</SettingsSectionHeader>
<SettingsSectionBody>