Skip to content

Commit

Permalink
fum
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Sep 21, 2023
1 parent 911e4b7 commit 1e92dd2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions plugin-server/functional_tests/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
PluginLogEntry,
RawAction,
RawClickHouseEvent,
RawPerformanceEvent,
RawSessionReplayEvent,
} from '../src/types'
import { PostgresRouter, PostgresUse } from '../src/utils/db/postgres'
Expand Down Expand Up @@ -302,8 +301,8 @@ export const fetchPostgresPersons = async (teamId: number) => {

export const fetchSessionReplayEvents = async (teamId: number, sessionId?: string) => {
const queryResult = (await clickHouseClient.querying(
`SELECT min(min_first_timestamp), any(team_id), any(distinct_id), sessionId FROM session_replay_events WHERE team_id = ${teamId} ${
sessionId ? ` AND sessionId = '${sessionId}'` : ''
`SELECT min(min_first_timestamp), any(team_id), any(distinct_id), session_id FROM session_replay_events WHERE team_id = ${teamId} ${
sessionId ? ` AND session_id = '${sessionId}'` : ''
} group by sessionId ORDER BY min_first_timestamp ASC`
)) as unknown as ClickHouse.ObjectQueryResult<RawSessionReplayEvent>
return queryResult.data.map((event) => {
Expand All @@ -313,13 +312,6 @@ export const fetchSessionReplayEvents = async (teamId: number, sessionId?: strin
})
}

export const fetchPerformanceEvents = async (teamId: number) => {
const queryResult = (await clickHouseClient.querying(
`SELECT * FROM performance_events WHERE team_id = ${teamId} ORDER BY timestamp ASC`
)) as unknown as ClickHouse.ObjectQueryResult<RawPerformanceEvent>
return queryResult.data
}

export const fetchPluginConsoleLogEntries = async (pluginConfigId: number) => {
const { data: logEntries } = (await clickHouseClient.querying(`
SELECT * FROM plugin_log_entries
Expand Down

0 comments on commit 1e92dd2

Please sign in to comment.