1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

chore(ui): add a separate feature flag for traffic visibility UI (#6832)

## About the changes

Adds a separate feature flag for the traffic data usage UI
This commit is contained in:
David Leek 2024-04-11 10:37:53 +02:00 committed by GitHub
parent a979ad802a
commit 88b5bfcb29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

View File

@ -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));

View File

@ -76,7 +76,7 @@ export type UiFlags = {
userAccessUIEnabled?: boolean;
outdatedSdksBanner?: boolean;
projectOverviewRefactor?: string;
collectTrafficDataUsage?: boolean;
displayTrafficDataUsage?: boolean;
disableShowContextFieldSelectionValues?: boolean;
variantDependencies?: boolean;
projectOverviewRefactorFeedback?: boolean;

View File

@ -88,6 +88,7 @@ exports[`should create default config 1`] = `
"disableShowContextFieldSelectionValues": false,
"disableUpdateMaxRevisionId": false,
"displayEdgeBanner": false,
"displayTrafficDataUsage": false,
"edgeBulkMetrics": false,
"embedProxy": true,
"embedProxyFrontend": true,

View File

@ -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,