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 02a8e80d61..45b4cd3e65 100644 --- a/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap +++ b/frontend/src/component/menu/__tests__/__snapshots__/routes.test.tsx.snap @@ -352,7 +352,7 @@ exports[`returns all baseRoutes 1`] = ` "menu": { "adminSettings": true, }, - "path": "/admin/sign-on-log", + "path": "/admin/signons", "title": "Sign on log", "type": "protected", }, diff --git a/frontend/src/component/menu/routes.ts b/frontend/src/component/menu/routes.ts index 6e15e28c86..b82aa03c44 100644 --- a/frontend/src/component/menu/routes.ts +++ b/frontend/src/component/menu/routes.ts @@ -357,7 +357,7 @@ export const routes: IRoute[] = [ }, { - path: '/admin/sign-on-log', + path: '/admin/signons', title: 'Sign on log', component: SignOnLog, type: 'protected', @@ -448,10 +448,10 @@ export const adminMenuRoutes: INavigationMenuItem[] = [ menu: { adminSettings: true }, }, { - path: '/admin/sign-on-log', + path: '/admin/signons', title: 'Sign-on log', menu: { adminSettings: true }, - flag: 'loginEventLog', + flag: 'signOnLog', }, { path: '/admin/users', diff --git a/frontend/src/hooks/api/actions/useSignOnLogApi/useSignOnLogApi.ts b/frontend/src/hooks/api/actions/useSignOnLogApi/useSignOnLogApi.ts index ac7f7d1185..a8570539ad 100644 --- a/frontend/src/hooks/api/actions/useSignOnLogApi/useSignOnLogApi.ts +++ b/frontend/src/hooks/api/actions/useSignOnLogApi/useSignOnLogApi.ts @@ -8,7 +8,7 @@ export const useSignOnLogApi = () => { const removeEvent = async (eventId: number) => { const requestId = 'removeEvent'; const req = createRequest( - `api/admin/login-event/${eventId}`, + `api/admin/signons/${eventId}`, { method: 'DELETE' }, requestId ); diff --git a/frontend/src/hooks/api/getters/useSignOnLog/useSignOnLog.ts b/frontend/src/hooks/api/getters/useSignOnLog/useSignOnLog.ts index de63833eb7..53dd3f1d2c 100644 --- a/frontend/src/hooks/api/getters/useSignOnLog/useSignOnLog.ts +++ b/frontend/src/hooks/api/getters/useSignOnLog/useSignOnLog.ts @@ -8,12 +8,12 @@ import useUiConfig from '../useUiConfig/useUiConfig'; export const useSignOnLog = () => { const { uiConfig, isEnterprise } = useUiConfig(); - const { loginEventLog } = uiConfig.flags; + const { signOnLog } = uiConfig.flags; const { data, error, mutate } = useConditionalSWR( - loginEventLog && isEnterprise(), + signOnLog && isEnterprise(), [], - formatApiPath(`api/admin/login-event`), + formatApiPath(`api/admin/signons`), fetcher ); diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 343074672f..e9f32e352c 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -47,7 +47,7 @@ export interface IFlags { showProjectApiAccess?: boolean; proPlanAutoCharge?: boolean; notifications?: boolean; - loginEventLog?: boolean; + signOnLog?: 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 6a37032dce..ccd38d593a 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -74,7 +74,6 @@ exports[`should create default config 1`] = ` "embedProxy": true, "embedProxyFrontend": true, "featuresExportImport": false, - "loginEventLog": false, "maintenanceMode": false, "messageBanner": false, "newProjectOverview": false, @@ -84,6 +83,7 @@ exports[`should create default config 1`] = ` "proxyReturnAllToggles": false, "responseTimeWithAppNameKillSwitch": false, "showProjectApiAccess": false, + "signOnLog": false, "strictSchemaValidation": false, }, }, @@ -96,7 +96,6 @@ exports[`should create default config 1`] = ` "embedProxy": true, "embedProxyFrontend": true, "featuresExportImport": false, - "loginEventLog": false, "maintenanceMode": false, "messageBanner": false, "newProjectOverview": false, @@ -106,6 +105,7 @@ exports[`should create default config 1`] = ` "proxyReturnAllToggles": false, "responseTimeWithAppNameKillSwitch": false, "showProjectApiAccess": false, + "signOnLog": false, "strictSchemaValidation": false, }, "externalResolver": { diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 1b13a21d2a..87addfaa88 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -63,10 +63,7 @@ const flags = { false, ), notifications: parseEnvVarBoolean(process.env.NOTIFICATIONS, false), - loginEventLog: parseEnvVarBoolean( - process.env.UNLEASH_LOGIN_EVENT_LOG, - false, - ), + signOnLog: parseEnvVarBoolean(process.env.UNLEASH_SIGN_ON_LOG, false), }; export const defaultExperimentalOptions: IExperimentalOptions = {