diff --git a/frontend/src/component/admin/billing/BillingDashboard/BillingPlan/BillingPlan.tsx b/frontend/src/component/admin/billing/BillingDashboard/BillingPlan/BillingPlan.tsx index 8d5a3a09c727..e417cc654c94 100644 --- a/frontend/src/component/admin/billing/BillingDashboard/BillingPlan/BillingPlan.tsx +++ b/frontend/src/component/admin/billing/BillingDashboard/BillingPlan/BillingPlan.tsx @@ -17,7 +17,6 @@ import { GridCol } from 'component/common/GridCol/GridCol'; import { Badge } from 'component/common/Badge/Badge'; import { GridColLink } from './GridColLink/GridColLink'; import { useTrafficDataEstimation } from 'hooks/useTrafficData'; -import { useUiFlag } from 'hooks/useUiFlag'; import { useInstanceTrafficMetrics } from 'hooks/api/getters/useInstanceTrafficMetrics/useInstanceTrafficMetrics'; const StyledPlanBox = styled('aside')(({ theme }) => ({ @@ -108,13 +107,11 @@ export const BillingPlan: FC = ({ instanceStatus }) => { const freeAssigned = Math.min(eligibleUsers.length, seats); const paidAssigned = eligibleUsers.length - freeAssigned; const paidAssignedPrice = price.user * paidAssigned; - - const displayTrafficDataUsageEnabled = useUiFlag('displayTrafficDataUsage'); const includedTraffic = isPro() ? proPlanIncludedRequests : 0; const traffic = useInstanceTrafficMetrics(currentPeriod.key); const overageCost = useMemo(() => { - if (!displayTrafficDataUsageEnabled || !includedTraffic) { + if (!includedTraffic) { return 0; } const trafficData = toChartData( @@ -124,13 +121,7 @@ export const BillingPlan: FC = ({ instanceStatus }) => { ); const totalTraffic = toTrafficUsageSum(trafficData); return calculateOverageCost(totalTraffic, includedTraffic); - }, [ - displayTrafficDataUsageEnabled, - includedTraffic, - traffic, - currentPeriod, - endpointsInfo, - ]); + }, [includedTraffic, traffic, currentPeriod, endpointsInfo]); const totalCost = planPrice + paidAssignedPrice + overageCost; diff --git a/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx b/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx index 1246cafe4c76..7735b3992a2b 100644 --- a/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx +++ b/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx @@ -23,7 +23,6 @@ import { Bar } from 'react-chartjs-2'; import { useInstanceTrafficMetrics } from 'hooks/api/getters/useInstanceTrafficMetrics/useInstanceTrafficMetrics'; import type { Theme } from '@mui/material/styles/createTheme'; import Grid from '@mui/material/Grid'; -import { useUiFlag } from 'hooks/useUiFlag'; import { NetworkTrafficUsagePlanSummary } from './NetworkTrafficUsagePlanSummary'; import annotationPlugin from 'chartjs-plugin-annotation'; import { @@ -197,8 +196,6 @@ export const NetworkTrafficUsage: VFC = () => { datasets, }; - const flagEnabled = useUiFlag('displayTrafficDataUsage'); - useEffect(() => { setDatasets(toChartData(labels, traffic, endpointsInfo)); }, [labels, traffic]); @@ -235,7 +232,7 @@ export const NetworkTrafficUsage: VFC = () => { return ( Not enabled.} elseShow={ <> diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index dc2fe378feed..71479206df9d 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -78,7 +78,6 @@ export type UiFlags = { featureSearchFeedbackPosting?: boolean; userAccessUIEnabled?: boolean; outdatedSdksBanner?: boolean; - displayTrafficDataUsage?: boolean; estimateTrafficDataCost?: boolean; disableShowContextFieldSelectionValues?: boolean; projectOverviewRefactorFeedback?: boolean; diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 5785ea90de57..7d0373adafb5 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -35,7 +35,6 @@ export type IFlagKey = | 'feedbackComments' | 'showInactiveUsers' | 'killScheduledChangeRequestCache' - | 'displayTrafficDataUsage' | 'estimateTrafficDataCost' | 'useMemoizedActiveTokens' | 'queryMissingTokens' @@ -207,10 +206,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_KILL_SCHEDULED_CHANGE_REQUEST_CACHE, false, ), - displayTrafficDataUsage: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_DISPLAY_TRAFFIC_DATA_USAGE, - false, - ), estimateTrafficDataCost: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_ESTIMATE_TRAFFIC_DATA_COST, false,