mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
Sessions page.
This commit is contained in:
parent
cd0f185f77
commit
ac60d08ee5
17 changed files with 414 additions and 16 deletions
|
|
@ -24,7 +24,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
}
|
||||
|
||||
async function clickhouseQuery(websiteId: string, filters: QueryFilters, pageParams?: PageParams) {
|
||||
const { pagedQuery, parseFilters, getDateStringSQL } = clickhouse;
|
||||
const { pagedQuery, parseFilters } = clickhouse;
|
||||
const { params, dateQuery, filterQuery } = await parseFilters(websiteId, filters);
|
||||
|
||||
return pagedQuery(
|
||||
|
|
@ -32,7 +32,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
select
|
||||
session_id as id,
|
||||
website_id as websiteId,
|
||||
${getDateStringSQL('created_at', 'second', filters.timezone)} as createdAt,
|
||||
min(created_at) as createdAt,
|
||||
hostname,
|
||||
browser,
|
||||
os,
|
||||
|
|
@ -41,13 +41,13 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters, pagePar
|
|||
language,
|
||||
country,
|
||||
subdivision1,
|
||||
subdivision2,
|
||||
city
|
||||
from website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
order by created_at desc
|
||||
group by session_id, website_id, hostname, browser, os, device, screen, language, country, subdivision1, city
|
||||
order by createdAt desc
|
||||
`,
|
||||
params,
|
||||
pageParams,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue