diff --git a/airbyte-webapp/src/core/services/features/constants.ts b/airbyte-webapp/src/core/services/features/constants.ts index 714d2495719..2a0e2332396 100644 --- a/airbyte-webapp/src/core/services/features/constants.ts +++ b/airbyte-webapp/src/core/services/features/constants.ts @@ -11,6 +11,7 @@ export const defaultEnterpriseFeatures = [ ...defaultOssFeatures, FeatureItem.AllowAllRBACRoles, FeatureItem.ConnectionHistoryGraphs, + FeatureItem.DiagnosticsExport, FeatureItem.DisplayOrganizationUsers, FeatureItem.EnterpriseBranding, FeatureItem.EnterpriseLicenseChecking, diff --git a/airbyte-webapp/src/core/services/features/types.tsx b/airbyte-webapp/src/core/services/features/types.tsx index 648000e9fd8..5b647ff928b 100644 --- a/airbyte-webapp/src/core/services/features/types.tsx +++ b/airbyte-webapp/src/core/services/features/types.tsx @@ -16,6 +16,7 @@ export enum FeatureItem { CloudForTeamsBranding = "CLOUD_FOR_TEAMS_BRANDING", ConnectionHistoryGraphs = "CONNECTION_HISTORY_GRAPHS", ConnectorBreakingChangeDeadlines = "CONNECTOR_BREAKING_CHANGE_DEADLINES", + DiagnosticsExport = "DIAGNOSTICS_EXPORT", DisplayOrganizationUsers = "DISPLAY_ORGANIZATION_USERS", EmailNotifications = "EMAIL_NOTIFICATIONS", EnterpriseBranding = "ENTERPRISE_BRANDING", diff --git a/airbyte-webapp/src/pages/SettingsPage/pages/Organization/GeneralOrganizationSettingsPage.tsx b/airbyte-webapp/src/pages/SettingsPage/pages/Organization/GeneralOrganizationSettingsPage.tsx index f1d7ab0e53b..bde2871b8d7 100644 --- a/airbyte-webapp/src/pages/SettingsPage/pages/Organization/GeneralOrganizationSettingsPage.tsx +++ b/airbyte-webapp/src/pages/SettingsPage/pages/Organization/GeneralOrganizationSettingsPage.tsx @@ -9,6 +9,7 @@ import { Text } from "components/ui/Text"; import { useCurrentWorkspace } from "core/api"; import { PageTrackingCodes, useTrackPage } from "core/services/analytics"; +import { FeatureItem, useFeature } from "core/services/features"; import { useIntent } from "core/utils/rbac"; import { useExperiment } from "hooks/services/Experiment"; import { DiagnosticsButton } from "pages/SettingsPage/components/DiagnosticButton"; @@ -19,7 +20,13 @@ export const GeneralOrganizationSettingsPage: React.FC = () => { useTrackPage(PageTrackingCodes.SETTINGS_ORGANIZATION); const { formatMessage } = useIntl(); const { workspaceId, organizationId } = useCurrentWorkspace(); - const isDownloadDiagnosticsEnabled = useExperiment("settings.downloadDiagnostics"); + const isDownloadDiagnosticsFlagEnabled = useExperiment("settings.downloadDiagnostics"); + const isDownloadDiagnosticsFeatureEnabled = useFeature(FeatureItem.DiagnosticsExport); + + // if EITHER flag OR feature is enabled, provide diagnostics + // effectively: flag controls OSS+Cloud, feature controls SME + const isDownloadDiagnosticsEnabled = isDownloadDiagnosticsFlagEnabled || isDownloadDiagnosticsFeatureEnabled; + const canDownloadDiagnostics = useIntent("DownloadDiagnostics", { workspaceId }) && isDownloadDiagnosticsEnabled; return (