mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-26 01:17:00 +02:00
feat: add authentication as a table filter (#3206)
Adds `auth` as a table filter. Also fixes the hook to correctly fetch the events based on the new return type. <img width="1046" alt="image" src="https://user-images.githubusercontent.com/14320932/221603312-a40055a8-4c23-4f1f-9a87-7fbd03e7b49e.png">
This commit is contained in:
parent
8e79820783
commit
c0124371ca
@ -79,6 +79,7 @@ export const SignOnLogTable = () => {
|
||||
maxWidth: 150,
|
||||
Cell: HighlightCell,
|
||||
searchable: true,
|
||||
filterName: 'auth',
|
||||
},
|
||||
{
|
||||
Header: 'IP address',
|
||||
@ -87,11 +88,11 @@ export const SignOnLogTable = () => {
|
||||
searchable: true,
|
||||
},
|
||||
{
|
||||
Header: 'Successful',
|
||||
Header: 'Success',
|
||||
accessor: 'successful',
|
||||
align: 'center',
|
||||
Cell: SignOnLogSuccessfulCell,
|
||||
filterName: 'successful',
|
||||
filterName: 'success',
|
||||
filterParsing: (value: boolean) => value.toString(),
|
||||
},
|
||||
{
|
||||
|
@ -12,14 +12,14 @@ export const useSignOnLog = () => {
|
||||
|
||||
const { data, error, mutate } = useConditionalSWR(
|
||||
signOnLog && isEnterprise(),
|
||||
[],
|
||||
{ events: [] },
|
||||
formatApiPath(`api/admin/signons`),
|
||||
fetcher
|
||||
);
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
events: (data ?? []) as ISignOnEvent[],
|
||||
events: (data?.events ?? []) as ISignOnEvent[],
|
||||
loading: !error && !data,
|
||||
refetch: () => mutate(),
|
||||
error,
|
||||
|
Loading…
Reference in New Issue
Block a user