1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

chore: rename login-event to sign-on-log (#3204)

Renames `login-event` to `sign-on-log`, in preparation for the rename
and refactor happening for this feature in Enterprise.
This commit is contained in:
Nuno Góis 2023-02-27 14:44:06 +00:00 committed by GitHub
parent 2d58de1a17
commit d94ba82e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 15 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@ export interface IFlags {
showProjectApiAccess?: boolean;
proPlanAutoCharge?: boolean;
notifications?: boolean;
loginEventLog?: boolean;
signOnLog?: boolean;
}
export interface IVersionInfo {

View File

@ -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": {

View File

@ -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 = {