diff --git a/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx b/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx new file mode 100644 index 0000000000..6632407906 --- /dev/null +++ b/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx @@ -0,0 +1,5 @@ +import { VFC } from 'react'; + +export const ExecutiveDashboard: VFC = () => { + return <>test; +}; diff --git a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap index 3ecab6df3b..d2821aabe8 100644 --- a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap +++ b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap @@ -426,5 +426,14 @@ exports[`returns all baseRoutes 1`] = ` "title": "Profile", "type": "protected", }, + { + "component": [Function], + "enterprise": true, + "flag": "executiveDashboard", + "menu": {}, + "path": "/dashboard", + "title": "Executive dashboard", + "type": "protected", + }, ] `; diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index db22e0d4e2..26be4509c5 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -45,6 +45,7 @@ import { FeatureTypesList } from 'component/featureTypes/FeatureTypesList'; import { ViewIntegration } from 'component/integrations/ViewIntegration/ViewIntegration'; import { ApplicationList } from '../application/ApplicationList/ApplicationList'; import { AddonRedirect } from 'component/integrations/AddonRedirect/AddonRedirect'; +import { ExecutiveDashboard } from 'component/executiveDashboard/ExecutiveDashboard'; export const routes: IRoute[] = [ // Splash @@ -429,6 +430,17 @@ export const routes: IRoute[] = [ menu: {}, }, + // Executive dashboard + { + path: '/dashboard', + title: 'Executive dashboard', + component: ExecutiveDashboard, + type: 'protected', + menu: {}, + flag: 'executiveDashboard', + enterprise: true, + }, + /* If you update this route path, make sure you update the path in SWRProvider.tsx */ { path: '/login', diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 2f615b02aa..ecf118c4a8 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -75,6 +75,7 @@ export type UiFlags = { newStrategyConfigurationFeedback?: boolean; extendedUsageMetricsUI?: boolean; adminTokenKillSwitch?: boolean; + executiveDashboard?: boolean; }; export interface IVersionInfo { diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index bbdf4a19d3..707c8911d1 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -90,6 +90,7 @@ exports[`should create default config 1`] = ` "embedProxyFrontend": true, "enableLicense": false, "encryptEmails": false, + "executiveDashboard": false, "extendedUsageMetrics": false, "extendedUsageMetricsUI": false, "featureSearchAPI": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index dc82cd2d1c..af46ae2ffb 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -44,7 +44,8 @@ export type IFlagKey = | 'extendedUsageMetrics' | 'extendedUsageMetricsUI' | 'adminTokenKillSwitch' - | 'changeRequestConflictHandling'; + | 'changeRequestConflictHandling' + | 'executiveDashboard'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -203,6 +204,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_CONFLICT_HANDLING, false, ), + executiveDashboard: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_EXECUTIVE_DASHBOARD, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index c4ed2e4a4b..9625c4b9d9 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -50,6 +50,7 @@ process.nextTick(async () => { featureSearchFeedback: true, newStrategyConfigurationFeedback: true, extendedUsageMetricsUI: true, + executiveDashboard: true, }, }, authentication: {