mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01: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. ![image](https://user-images.githubusercontent.com/14320932/221917306-d115f447-bfda-4d18-9bc7-545d76c03c22.png)
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