This commit is contained in:
Marc Abramowitz 2025-04-24 00:53:56 -07:00 committed by GitHub
commit d8a6243b23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View file

@ -450,6 +450,8 @@ export function AllKeysTable({
columns={columns.filter(col => col.id !== 'expander') as any}
data={filteredKeys as any}
isLoading={isLoading}
loadingMessage="🚅 Loading keys..."
noDataMessage="No keys found"
getRowCanExpand={() => false}
renderSubComponent={() => <></>}
/>

View file

@ -26,6 +26,8 @@ function DataTableWrapper({
isLoading={isLoading}
renderSubComponent={renderSubComponent}
getRowCanExpand={getRowCanExpand}
loadingMessage="🚅 Loading tools..."
noDataMessage="No tools found"
/>
);
}

View file

@ -26,6 +26,8 @@ interface DataTableProps<TData, TValue> {
expandedRequestId?: string | null;
onRowExpand?: (requestId: string | null) => void;
setSelectedKeyIdInfoView?: (keyId: string | null) => void;
loadingMessage?: string;
noDataMessage?: string;
}
export function DataTable<TData extends { request_id: string }, TValue>({
@ -36,6 +38,8 @@ export function DataTable<TData extends { request_id: string }, TValue>({
isLoading = false,
expandedRequestId,
onRowExpand,
loadingMessage = "🚅 Loading logs...",
noDataMessage = "No logs found",
}: DataTableProps<TData, TValue>) {
const table = useReactTable({
data,
@ -114,7 +118,7 @@ export function DataTable<TData extends { request_id: string }, TValue>({
<TableRow>
<TableCell colSpan={columns.length} className="h-8 text-center">
<div className="text-center text-gray-500">
<p>🚅 Loading logs...</p>
<p>{loadingMessage}</p>
</div>
</TableCell>
</TableRow>
@ -147,7 +151,7 @@ export function DataTable<TData extends { request_id: string }, TValue>({
: <TableRow>
<TableCell colSpan={columns.length} className="h-8 text-center">
<div className="text-center text-gray-500">
<p>No logs found</p>
<p>{noDataMessage}</p>
</div>
</TableCell>
</TableRow>