import { Event } from 'kubernetes-types/core/v1'; import { History } from 'lucide-react'; import { IndexOptional } from '@/react/kubernetes/configs/types'; import { TableSettings } from '@/react/kubernetes/datatables/DefaultDatatableSettings'; import { Datatable, TableSettingsMenu } from '@@/datatables'; import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh'; import { TableState } from '@@/datatables/useTableState'; import { columns } from './columns'; type Props = { dataset: Event[]; tableState: TableState; isLoading: boolean; 'data-cy': string; noWidget?: boolean; }; export function EventsDatatable({ dataset, tableState, isLoading, 'data-cy': dataCy, noWidget, }: Props) { return ( > dataset={dataset} columns={columns} settingsManager={tableState} isLoading={isLoading} emptyContentLabel="No event available." title="Events" titleIcon={History} getRowId={(row) => row.metadata?.uid || ''} disableSelect renderTableSettings={() => ( tableState.setAutoRefreshRate(value)} /> )} data-cy={dataCy} noWidget={noWidget} /> ); }