mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +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": {
|
"menu": {
|
||||||
"adminSettings": true,
|
"adminSettings": true,
|
||||||
},
|
},
|
||||||
"path": "/admin/sign-on-log",
|
"path": "/admin/signons",
|
||||||
"title": "Sign on log",
|
"title": "Sign on log",
|
||||||
"type": "protected",
|
"type": "protected",
|
||||||
},
|
},
|
||||||
|
@ -357,7 +357,7 @@ export const routes: IRoute[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/admin/sign-on-log',
|
path: '/admin/signons',
|
||||||
title: 'Sign on log',
|
title: 'Sign on log',
|
||||||
component: SignOnLog,
|
component: SignOnLog,
|
||||||
type: 'protected',
|
type: 'protected',
|
||||||
@ -448,10 +448,10 @@ export const adminMenuRoutes: INavigationMenuItem[] = [
|
|||||||
menu: { adminSettings: true },
|
menu: { adminSettings: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/admin/sign-on-log',
|
path: '/admin/signons',
|
||||||
title: 'Sign-on log',
|
title: 'Sign-on log',
|
||||||
menu: { adminSettings: true },
|
menu: { adminSettings: true },
|
||||||
flag: 'loginEventLog',
|
flag: 'signOnLog',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/admin/users',
|
path: '/admin/users',
|
||||||
|
@ -8,7 +8,7 @@ export const useSignOnLogApi = () => {
|
|||||||
const removeEvent = async (eventId: number) => {
|
const removeEvent = async (eventId: number) => {
|
||||||
const requestId = 'removeEvent';
|
const requestId = 'removeEvent';
|
||||||
const req = createRequest(
|
const req = createRequest(
|
||||||
`api/admin/login-event/${eventId}`,
|
`api/admin/signons/${eventId}`,
|
||||||
{ method: 'DELETE' },
|
{ method: 'DELETE' },
|
||||||
requestId
|
requestId
|
||||||
);
|
);
|
||||||
|
@ -8,12 +8,12 @@ import useUiConfig from '../useUiConfig/useUiConfig';
|
|||||||
export const useSignOnLog = () => {
|
export const useSignOnLog = () => {
|
||||||
const { uiConfig, isEnterprise } = useUiConfig();
|
const { uiConfig, isEnterprise } = useUiConfig();
|
||||||
|
|
||||||
const { loginEventLog } = uiConfig.flags;
|
const { signOnLog } = uiConfig.flags;
|
||||||
|
|
||||||
const { data, error, mutate } = useConditionalSWR(
|
const { data, error, mutate } = useConditionalSWR(
|
||||||
loginEventLog && isEnterprise(),
|
signOnLog && isEnterprise(),
|
||||||
[],
|
[],
|
||||||
formatApiPath(`api/admin/login-event`),
|
formatApiPath(`api/admin/signons`),
|
||||||
fetcher
|
fetcher
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ export interface IFlags {
|
|||||||
showProjectApiAccess?: boolean;
|
showProjectApiAccess?: boolean;
|
||||||
proPlanAutoCharge?: boolean;
|
proPlanAutoCharge?: boolean;
|
||||||
notifications?: boolean;
|
notifications?: boolean;
|
||||||
loginEventLog?: boolean;
|
signOnLog?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IVersionInfo {
|
export interface IVersionInfo {
|
||||||
|
@ -74,7 +74,6 @@ exports[`should create default config 1`] = `
|
|||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
"featuresExportImport": false,
|
"featuresExportImport": false,
|
||||||
"loginEventLog": false,
|
|
||||||
"maintenanceMode": false,
|
"maintenanceMode": false,
|
||||||
"messageBanner": false,
|
"messageBanner": false,
|
||||||
"newProjectOverview": false,
|
"newProjectOverview": false,
|
||||||
@ -84,6 +83,7 @@ exports[`should create default config 1`] = `
|
|||||||
"proxyReturnAllToggles": false,
|
"proxyReturnAllToggles": false,
|
||||||
"responseTimeWithAppNameKillSwitch": false,
|
"responseTimeWithAppNameKillSwitch": false,
|
||||||
"showProjectApiAccess": false,
|
"showProjectApiAccess": false,
|
||||||
|
"signOnLog": false,
|
||||||
"strictSchemaValidation": false,
|
"strictSchemaValidation": false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -96,7 +96,6 @@ exports[`should create default config 1`] = `
|
|||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
"featuresExportImport": false,
|
"featuresExportImport": false,
|
||||||
"loginEventLog": false,
|
|
||||||
"maintenanceMode": false,
|
"maintenanceMode": false,
|
||||||
"messageBanner": false,
|
"messageBanner": false,
|
||||||
"newProjectOverview": false,
|
"newProjectOverview": false,
|
||||||
@ -106,6 +105,7 @@ exports[`should create default config 1`] = `
|
|||||||
"proxyReturnAllToggles": false,
|
"proxyReturnAllToggles": false,
|
||||||
"responseTimeWithAppNameKillSwitch": false,
|
"responseTimeWithAppNameKillSwitch": false,
|
||||||
"showProjectApiAccess": false,
|
"showProjectApiAccess": false,
|
||||||
|
"signOnLog": false,
|
||||||
"strictSchemaValidation": false,
|
"strictSchemaValidation": false,
|
||||||
},
|
},
|
||||||
"externalResolver": {
|
"externalResolver": {
|
||||||
|
@ -63,10 +63,7 @@ const flags = {
|
|||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
notifications: parseEnvVarBoolean(process.env.NOTIFICATIONS, false),
|
notifications: parseEnvVarBoolean(process.env.NOTIFICATIONS, false),
|
||||||
loginEventLog: parseEnvVarBoolean(
|
signOnLog: parseEnvVarBoolean(process.env.UNLEASH_SIGN_ON_LOG, false),
|
||||||
process.env.UNLEASH_LOGIN_EVENT_LOG,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultExperimentalOptions: IExperimentalOptions = {
|
export const defaultExperimentalOptions: IExperimentalOptions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user