mirror of
https://github.com/supabase/supabase.git
synced 2026-05-24 12:47:48 +08:00
## Context Supports selecting log rows and allow to copy / ask assistant for selected rows, similar to what we had for the old logs UI Selection will clear whenever the search parameters change <img width="1448" height="413" alt="image" src="https://github.com/user-attachments/assets/b81b359c-28c3-48a8-9895-e77327ebd33e" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Multi-row selection with an action header showing selected count * Copy selected logs as JSON or Markdown from a dropdown * "Explain with AI" action to open the assistant pre-filled with selected logs * Clear selection button * **Refactor** * Row/detail selection now syncs with the URL for shareable views and improves next/previous navigation and panel behavior * **Style** * Minor visual tweak to column level indicator dot size <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45974) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
28 lines
587 B
TypeScript
28 lines
587 B
TypeScript
import { cn } from 'ui'
|
|
|
|
import { LEVELS } from '../DataTable.constants'
|
|
import { getLevelColor } from '../DataTable.utils'
|
|
|
|
export const DataTableColumnLevelIndicator = ({
|
|
value,
|
|
className,
|
|
dotClassName,
|
|
}: {
|
|
value: (typeof LEVELS)[number]
|
|
className?: string
|
|
dotClassName?: string
|
|
}) => {
|
|
return (
|
|
<div className={cn('flex items-center justify-center', className)}>
|
|
<div
|
|
className={cn(
|
|
'h-2 w-2 rounded-full',
|
|
getLevelColor(value).bg,
|
|
getLevelColor(value).border,
|
|
dotClassName
|
|
)}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|