mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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 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'],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user