mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +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:
parent
bcb7a803d0
commit
6458d461b9
@ -2,6 +2,7 @@ import { useState, useEffect, type FC } from 'react';
|
|||||||
import { Filters, type IFilterItem } from 'component/filter/Filters/Filters';
|
import { Filters, type IFilterItem } from 'component/filter/Filters/Filters';
|
||||||
import useProjects from 'hooks/api/getters/useProjects/useProjects';
|
import useProjects from 'hooks/api/getters/useProjects/useProjects';
|
||||||
import { useFeatureSearch } from 'hooks/api/getters/useFeatureSearch/useFeatureSearch';
|
import { useFeatureSearch } from 'hooks/api/getters/useFeatureSearch/useFeatureSearch';
|
||||||
|
import { EventSchemaType } from 'openapi';
|
||||||
|
|
||||||
const flagLogFilters: IFilterItem[] = [
|
const flagLogFilters: IFilterItem[] = [
|
||||||
{
|
{
|
||||||
@ -31,7 +32,10 @@ const flagLogFilters: IFilterItem[] = [
|
|||||||
// todo fill this in with actual values
|
// todo fill this in with actual values
|
||||||
label: 'Event type',
|
label: 'Event type',
|
||||||
icon: 'announcement',
|
icon: 'announcement',
|
||||||
options: [],
|
options: Object.entries(EventSchemaType).map(([key, value]) => ({
|
||||||
|
label: key,
|
||||||
|
value: value,
|
||||||
|
})),
|
||||||
filterKey: 'eventType',
|
filterKey: 'eventType',
|
||||||
singularOperators: ['IS'],
|
singularOperators: ['IS'],
|
||||||
pluralOperators: ['IS_ANY_OF'],
|
pluralOperators: ['IS_ANY_OF'],
|
||||||
|
Loading…
Reference in New Issue
Block a user