diff --git a/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx b/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx index b7172e819b6c..03c02bdcfbd1 100644 --- a/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx +++ b/frontend/src/component/admin/network/NetworkTrafficUsage/NetworkTrafficUsage.tsx @@ -322,7 +322,7 @@ export const NetworkTrafficUsage: VFC = () => { }; const { isOss } = useUiConfig(); - const flagEnabled = useUiFlag('collectTrafficDataUsage'); + const flagEnabled = useUiFlag('displayTrafficDataUsage'); useEffect(() => { setDatasets(toChartData(labels, traffic, endpointsInfo)); diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index f830b81d4574..26bbf90f61a1 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -76,7 +76,7 @@ export type UiFlags = { userAccessUIEnabled?: boolean; outdatedSdksBanner?: boolean; projectOverviewRefactor?: string; - collectTrafficDataUsage?: boolean; + displayTrafficDataUsage?: boolean; disableShowContextFieldSelectionValues?: boolean; variantDependencies?: boolean; projectOverviewRefactorFeedback?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index f35264719025..d6a5d39d85e0 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -88,6 +88,7 @@ exports[`should create default config 1`] = ` "disableShowContextFieldSelectionValues": false, "disableUpdateMaxRevisionId": false, "displayEdgeBanner": false, + "displayTrafficDataUsage": false, "edgeBulkMetrics": false, "embedProxy": true, "embedProxyFrontend": true, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 0d47ac906d1a..5da6f14d5311 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -41,6 +41,7 @@ export type IFlagKey = | 'showInactiveUsers' | 'inMemoryScheduledChangeRequests' | 'collectTrafficDataUsage' + | 'displayTrafficDataUsage' | 'useMemoizedActiveTokens' | 'queryMissingTokens' | 'userAccessUIEnabled' @@ -223,6 +224,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_COLLECT_TRAFFIC_DATA_USAGE, false, ), + displayTrafficDataUsage: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_DISPLAY_TRAFFIC_DATA_USAGE, + false, + ), userAccessUIEnabled: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_USER_ACCESS_UI_ENABLED, false,