mirror of
https://github.com/supabase/supabase.git
synced 2026-06-22 01:02:52 +08:00
31 lines
835 B
TypeScript
31 lines
835 B
TypeScript
import { Column } from 'react-data-grid'
|
|
import type { LogData } from '../Logs.types'
|
|
import {
|
|
RowLayout,
|
|
SeverityFormatter,
|
|
TextFormatter,
|
|
TimestampLocalFormatter,
|
|
} from '../LogsFormatters'
|
|
import { defaultRenderCell } from './DefaultPreviewColumnRenderer'
|
|
|
|
const columns: Column<LogData>[] = [
|
|
{
|
|
name: 'database-postgres-first-column',
|
|
key: 'database-postgres-first-column',
|
|
renderCell: (props) => {
|
|
if (!props.row.error_severity) {
|
|
return defaultRenderCell(props)
|
|
}
|
|
return (
|
|
<RowLayout>
|
|
<TimestampLocalFormatter value={props.row.timestamp!} />
|
|
<SeverityFormatter value={props.row.error_severity as string} />
|
|
<TextFormatter className="w-full" value={props.row.event_message} />
|
|
</RowLayout>
|
|
)
|
|
},
|
|
},
|
|
]
|
|
|
|
export default columns
|