mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-12 13:48:35 +02:00
feat: smarter auth type labels on sign-on log table (#3220)
Small change to make the `Authentication` column in the Sign-on Log table display nice-to-read labels for the multiple authentication types. 
This commit is contained in:
parent
b279197623
commit
d27f0fe5ab
@ -37,6 +37,13 @@ const { value: storedParams, setValue: setStoredParams } = createLocalStorage(
|
|||||||
defaultSort
|
defaultSort
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const AUTH_TYPE_LABEL: { [key: string]: string } = {
|
||||||
|
simple: 'Password',
|
||||||
|
oidc: 'OIDC',
|
||||||
|
saml: 'SAML',
|
||||||
|
google: 'Google',
|
||||||
|
};
|
||||||
|
|
||||||
export const SignOnLogTable = () => {
|
export const SignOnLogTable = () => {
|
||||||
const { setToastData, setToastApiError } = useToast();
|
const { setToastData, setToastApiError } = useToast();
|
||||||
|
|
||||||
@ -99,9 +106,7 @@ export const SignOnLogTable = () => {
|
|||||||
{
|
{
|
||||||
Header: 'Authentication',
|
Header: 'Authentication',
|
||||||
accessor: (event: ISignOnEvent) =>
|
accessor: (event: ISignOnEvent) =>
|
||||||
event.auth_type === 'simple'
|
AUTH_TYPE_LABEL[event.auth_type] || event.auth_type,
|
||||||
? 'Password'
|
|
||||||
: event.auth_type.toUpperCase(),
|
|
||||||
width: 150,
|
width: 150,
|
||||||
maxWidth: 150,
|
maxWidth: 150,
|
||||||
Cell: HighlightCell,
|
Cell: HighlightCell,
|
||||||
|
Loading…
Reference in New Issue
Block a user