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:
parent
2d58de1a17
commit
d94ba82e3a
@ -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",
|
||||
},
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
);
|
||||
|
@ -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
|
||||
);
|
||||
|
||||
|
@ -47,7 +47,7 @@ export interface IFlags {
|
||||
showProjectApiAccess?: boolean;
|
||||
proPlanAutoCharge?: boolean;
|
||||
notifications?: boolean;
|
||||
loginEventLog?: boolean;
|
||||
signOnLog?: boolean;
|
||||
}
|
||||
|
||||
export interface IVersionInfo {
|
||||
|
@ -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": {
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user