1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-18 13:48:58 +02:00

chore: move consumption UI behind separate flag (#10495)

Move consumption UI to separate flag.
This commit is contained in:
Jaanus Sellin 2025-08-14 14:25:36 +03:00 committed by GitHub
parent 5b879d9331
commit b6ea8a3849
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 4 deletions

View File

@ -142,21 +142,21 @@ export const adminRoutes: INavigationMenuItem[] = [
title: 'Backend connections',
menu: { adminSettings: true, mode: ['pro', 'enterprise'] },
group: 'network',
flag: 'consumptionModel',
flag: 'consumptionModelUI',
},
{
path: '/admin/network/frontend-data-usage',
title: 'Frontend data usage',
menu: { adminSettings: true, mode: ['pro', 'enterprise'] },
group: 'network',
flag: 'consumptionModel',
flag: 'consumptionModelUI',
},
{
path: '/admin/network/data-usage',
title: 'Data usage',
menu: { adminSettings: true, mode: ['pro', 'enterprise'] },
group: 'network',
notFlag: 'consumptionModel',
notFlag: 'consumptionModelUI',
},
// Instance configuration

View File

@ -61,7 +61,7 @@ const consumptionModelTabs = [
export const Network = () => {
const { pathname } = useLocation();
const edgeObservabilityEnabled = useUiFlag('edgeObservability');
const consumptionModelEnabled = useUiFlag('consumptionModel');
const consumptionModelEnabled = useUiFlag('consumptionModelUI');
const allTabs = consumptionModelEnabled
? [...tabs, ...consumptionModelTabs]
: [...tabs, ...seatModelTabs];

View File

@ -83,6 +83,7 @@ export type UiFlags = {
productivityReportEmail?: boolean;
showUserDeviceCount?: boolean;
consumptionModel?: boolean;
consumptionModelUI?: boolean;
edgeObservability?: boolean;
customMetrics?: boolean;
lifecycleMetrics?: boolean;

View File

@ -51,6 +51,7 @@ export type IFlagKey =
| 'deltaApi'
| 'uniqueSdkTracking'
| 'consumptionModel'
| 'consumptionModelUI'
| 'edgeObservability'
| 'reportUnknownFlags'
| 'lifecycleMetrics'
@ -250,6 +251,10 @@ const flags: IFlags = {
process.env.EXPERIMENTAL_CONSUMPTION_MODEL,
false,
),
consumptionModelUI: parseEnvVarBoolean(
process.env.EXPERIMENTAL_CONSUMPTION_MODEL_UI,
false,
),
edgeObservability: parseEnvVarBoolean(
process.env.EXPERIMENTAL_EDGE_OBSERVABILITY,
false,