From 998364b09d90cd18897aff4dcf767e2566310b95 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 6 May 2026 16:13:07 -0700 Subject: [PATCH] Properly respect flags.disableEnterpriseFeatures --- messages/en-US.json | 8 ++++---- src/app/navigation.tsx | 14 ++++++++------ src/components/InternalResourceForm.tsx | 16 ++++++++++------ src/components/UptimeAlertSection.tsx | 8 ++++++-- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 3e1b29d88..a598dcc39 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -2660,19 +2660,19 @@ "noMoreAuthMethods": "No Valid Auth", "ip": "IP", "reason": "Reason", - "requestLogs": "HTTPS Request Logs", + "requestLogs": "HTTP Request Logs", "requestAnalytics": "Request Analytics", "host": "Host", "location": "Location", "actionLogs": "Admin Action Logs", - "sidebarLogsRequest": "HTTPS Request Logs", + "sidebarLogsRequest": "HTTP Request Logs", "sidebarLogsAccess": "Authentication Logs", "sidebarLogsAction": "Admin Action Logs", "logRetention": "Log Retention", "logRetentionDescription": "Manage how long different types of logs are retained for this organization or disable them", "requestLogsDescription": "View detailed request logs for HTTPS resources in this organization", "requestAnalyticsDescription": "View detailed request analytics for resources in this organization", - "logRetentionRequestLabel": "HTTPS Request Log Retention", + "logRetentionRequestLabel": "HTTP Request Log Retention", "logRetentionRequestDescription": "How long to retain request logs", "logRetentionAccessLabel": "Authentication Log Retention", "logRetentionAccessDescription": "How long to retain access logs", @@ -3134,7 +3134,7 @@ "httpDestActionLogsDescription": "Administrative actions performed by users within the organization.", "httpDestConnectionLogsTitle": "Network Logs", "httpDestConnectionLogsDescription": "Site and tunnel connection events, including connects and disconnects.", - "httpDestRequestLogsTitle": "HTTPS Request Logs", + "httpDestRequestLogsTitle": "HTTP Request Logs", "httpDestRequestLogsDescription": "HTTP request logs for proxied resources, including method, path, and response code.", "httpDestSaveChanges": "Save Changes", "httpDestCreateDestination": "Create Destination", diff --git a/src/app/navigation.tsx b/src/app/navigation.tsx index 1989161a9..3cfe867e3 100644 --- a/src/app/navigation.tsx +++ b/src/app/navigation.tsx @@ -217,15 +217,17 @@ export const orgNavSections = ( { title: "sidebarAlerting", href: "/{orgId}/settings/alerting", - icon: + icon: ( + + ) + }, + { + title: "sidebarProvisioning", + href: "/{orgId}/settings/provisioning", + icon: } ] : []), - { - title: "sidebarProvisioning", - href: "/{orgId}/settings/provisioning", - icon: - }, { title: "sidebarBluePrints", href: "/{orgId}/settings/blueprints", diff --git a/src/components/InternalResourceForm.tsx b/src/components/InternalResourceForm.tsx index 3d4febe44..357353d8e 100644 --- a/src/components/InternalResourceForm.tsx +++ b/src/components/InternalResourceForm.tsx @@ -840,12 +840,16 @@ export function InternalResourceForm({ modeCidrKey ) }, - { - value: "http", - label: t( - modeHttpKey - ) - } + ...(!disableEnterpriseFeatures + ? [ + { + value: "http" as const, + label: t( + modeHttpKey + ) + } + ] + : []) ]; return ( diff --git a/src/components/UptimeAlertSection.tsx b/src/components/UptimeAlertSection.tsx index 6c9edc923..a671a2dd5 100644 --- a/src/components/UptimeAlertSection.tsx +++ b/src/components/UptimeAlertSection.tsx @@ -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 })} - {alertButton} + {!env.flags.disableEnterpriseFeatures + ? alertButton + : null}