Skip to content

Commit

Permalink
chore: add a toggle for project segments (#3272)
Browse files Browse the repository at this point in the history
## About the changes
This adds a new flag that can be used in the UI to display project
specific segments
  • Loading branch information
gastonfournier committed Mar 8, 2023
1 parent 068c55a commit 7c28936
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/interfaces/uiConfig.ts
Expand Up @@ -48,6 +48,7 @@ export interface IFlags {
proPlanAutoCharge?: boolean;
notifications?: boolean;
loginHistory?: boolean;
projectScopedSegments?: boolean;
}

export interface IVersionInfo {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -80,6 +80,7 @@ exports[`should create default config 1`] = `
"newProjectOverview": false,
"notifications": false,
"proPlanAutoCharge": false,
"projectScopedSegments": false,
"projectStatusApi": false,
"proxyReturnAllToggles": false,
"responseTimeWithAppNameKillSwitch": false,
Expand All @@ -102,6 +103,7 @@ exports[`should create default config 1`] = `
"newProjectOverview": false,
"notifications": false,
"proPlanAutoCharge": false,
"projectScopedSegments": false,
"projectStatusApi": false,
"proxyReturnAllToggles": false,
"responseTimeWithAppNameKillSwitch": false,
Expand Down
4 changes: 4 additions & 0 deletions src/lib/types/experimental.ts
Expand Up @@ -64,6 +64,10 @@ const flags = {
),
notifications: parseEnvVarBoolean(process.env.NOTIFICATIONS, false),
loginHistory: parseEnvVarBoolean(process.env.UNLEASH_LOGIN_HISTORY, false),
projectScopedSegments: parseEnvVarBoolean(
process.env.PROJECT_SCOPED_SEGMENTS,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down
1 change: 1 addition & 0 deletions src/server-dev.ts
Expand Up @@ -42,6 +42,7 @@ process.nextTick(async () => {
newProjectOverview: true,
projectStatusApi: true,
showProjectApiAccess: true,
projectScopedSegments: true,
},
},
authentication: {
Expand Down

0 comments on commit 7c28936

Please sign in to comment.