1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: add event types to filter button (#7733)

Add event types to the event log filter button.

The event types are taken from the OpenAPI definition.
This commit is contained in:
Thomas Heartman 2024-08-02 10:25:25 +02:00 committed by GitHub
parent bcb7a803d0
commit 6458d461b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@ import { useState, useEffect, type FC } from 'react';
import { Filters, type IFilterItem } from 'component/filter/Filters/Filters';
import useProjects from 'hooks/api/getters/useProjects/useProjects';
import { useFeatureSearch } from 'hooks/api/getters/useFeatureSearch/useFeatureSearch';
import { EventSchemaType } from 'openapi';
const flagLogFilters: IFilterItem[] = [
{
@ -31,7 +32,10 @@ const flagLogFilters: IFilterItem[] = [
// todo fill this in with actual values
label: 'Event type',
icon: 'announcement',
options: [],
options: Object.entries(EventSchemaType).map(([key, value]) => ({
label: key,
value: value,
})),
filterKey: 'eventType',
singularOperators: ['IS'],
pluralOperators: ['IS_ANY_OF'],