@@ -7,6 +7,7 @@ import { useCallback, useState } from 'react'
77import { PreAggregatedBadge } from 'lib/components/PreAggregatedBadge'
88import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
99import { TaxonomicPopover } from 'lib/components/TaxonomicPopover/TaxonomicPopover'
10+ import ViewRecordingButton from 'lib/components/ViewRecordingButton/ViewRecordingButton'
1011import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'
1112import { LemonButton } from 'lib/lemon-ui/LemonButton'
1213import { LemonDivider } from 'lib/lemon-ui/LemonDivider'
@@ -195,6 +196,7 @@ export function DataTable({
195196
196197 const {
197198 showActions,
199+ showRecordingColumn,
198200 showDateRange,
199201 showTestAccountFilters,
200202 showSearch,
@@ -219,6 +221,8 @@ export function DataTable({
219221
220222 const eventActionsColumnShown =
221223 showActions && sourceFeatures . has ( QueryFeature . eventActionsColumn ) && columnsInResponse ?. includes ( '*' )
224+ const recordingColumnShown =
225+ showRecordingColumn && sourceFeatures . has ( QueryFeature . eventActionsColumn ) && columnsInResponse ?. includes ( '*' )
222226 const allColumns = sourceFeatures . has ( QueryFeature . columnsInResponse )
223227 ? ( columnsInResponse ?? columnsInQuery )
224228 : columnsInQuery
@@ -561,6 +565,35 @@ export function DataTable({
561565 </ >
562566 ) : undefined ,
563567 } ) ) ,
568+ ...( recordingColumnShown
569+ ? [
570+ {
571+ dataIndex : '__recording' as any ,
572+ title : '' ,
573+ render : function RenderRecording ( _ : any , { label, result } : DataTableRow ) {
574+ if ( label ) {
575+ return { props : { colSpan : 0 } }
576+ }
577+ if ( result && columnsInResponse ?. includes ( '*' ) ) {
578+ const event = result [ columnsInResponse . indexOf ( '*' ) ]
579+ return (
580+ < ViewRecordingButton
581+ sessionId = { event ?. properties ?. $session_id }
582+ recordingStatus = { event ?. properties ?. $recording_status }
583+ timestamp = { event ?. timestamp }
584+ inModal
585+ size = "xsmall"
586+ type = "secondary"
587+ />
588+ )
589+ }
590+ return null
591+ } ,
592+ width : 100 ,
593+ align : 'center' as const ,
594+ } ,
595+ ]
596+ : [ ] ) ,
564597 ...( eventActionsColumnShown
565598 ? [
566599 {
0 commit comments