Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add link from live events view to explore view #29349

Merged
merged 13 commits into from
Mar 1, 2025
25 changes: 24 additions & 1 deletion frontend/src/scenes/activity/live/LiveEventsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { TZLabel } from 'lib/components/TZLabel'
import { LemonTable, LemonTableColumns } from 'lib/lemon-ui/LemonTable'
import { liveEventsTableLogic } from 'scenes/activity/live/liveEventsTableLogic'
import { PersonDisplay } from 'scenes/persons/PersonDisplay'
import { Link } from 'lib/lemon-ui/Link'
import { urls } from 'scenes/urls'
import { ActivityTab, PropertyOperator } from '~/types'

import type { LiveEvent } from '~/types'

Expand All @@ -17,7 +20,27 @@ const columns: LemonTableColumns<LiveEvent> = [
key: 'event',
className: 'max-w-80',
render: function Render(_, event: LiveEvent) {
return <PropertyKeyInfo value={event.event} type={TaxonomicFilterGroupType.Events} />
const searchUrl = urls.activity(ActivityTab.ExploreEvents) + `?q=${encodeURIComponent(JSON.stringify({
kind: 'DataTableNode',
full: true,
source: {
kind: 'EventsQuery',
properties: [
{
key: '$event_uuid',
operator: PropertyOperator.Exact,
type: 'event',
value: event.uuid
}
]
},
propertiesViaUrl: true
}))}`
return (
<Link to={searchUrl}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should instead implement the "Copy link to event" pattern, because this inline link fundamentally doesn't work: at the point in time the user sees a live event come in, that event does not yet exist in ClickHouse for a minute or so (depending on ingestion lag), so this link is effectively a 404

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in DataTable: code

Copy link
Contributor Author

@frankh frankh Feb 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, that's why i made it a search instead of direct to the event, so you can search and refresh until it comes in - maybe we just need a user friendly way of telling users that it might be delayed though

copy link to event has the same issue right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, in the end i went with your way 1) for consistency, and 2) because we already have a tooltip on the event name and adding a second tooltip didn't work - and i wanted the warning tooltip saying it might not show up

see screenshot!

<PropertyKeyInfo value={event.event} type={TaxonomicFilterGroupType.Events} />
</Link>
)
},
},
{
Expand Down
Loading