import React from "react"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui"; import { Badge } from "@/components/ui"; import type { EventInfo } from "@/lib/tauriCommands"; interface EventListProps { events: EventInfo[]; clusterId: string; namespace?: string; } export function EventList({ events, clusterId: _clusterId, namespace: _namespace }: EventListProps) { const getEventTypeColor = (type: string) => { switch (type.toLowerCase()) { case "normal": return "bg-blue-500"; case "warning": return "bg-yellow-500 text-yellow-900"; default: return "bg-gray-500"; } }; return (
Name Type Reason Object Count First Seen Last Seen Message {events.length === 0 ? ( No events found ) : ( events.map((event) => ( {event.name} {event.event_type} {event.reason} {event.object} {event.count} {event.first_seen} {event.last_seen} {event.message} )) )}
); }