mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
28 lines
910 B
TypeScript
28 lines
910 B
TypeScript
import { Column } from 'react-data-grid'
|
|
import type { LogData } from '../Logs.types'
|
|
import { ResponseCodeFormatter, RowLayout, TextFormatter } from '../LogsFormatters'
|
|
import { defaultRenderCell } from './DefaultPreviewColumnRenderer'
|
|
import { TimestampInfo } from 'ui-patterns/TimestampInfo'
|
|
|
|
const columns: Column<LogData>[] = [
|
|
{
|
|
name: 'functions-edge-first-column',
|
|
key: 'functions-edge-first-column',
|
|
renderCell: (props) => {
|
|
if (!props.row.status_code && !props.row.method) {
|
|
return defaultRenderCell(props)
|
|
}
|
|
return (
|
|
<RowLayout>
|
|
<TimestampInfo utcTimestamp={props.row.timestamp!} />
|
|
<ResponseCodeFormatter value={String(props.row.status_code)} />
|
|
<TextFormatter value={String(props.row.method)} />
|
|
<TextFormatter value={String(props.row.id)} />
|
|
</RowLayout>
|
|
)
|
|
},
|
|
},
|
|
]
|
|
|
|
export default columns
|