mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
fix monthly and all time charts
This commit is contained in:
parent
a219f5dbe3
commit
b1caf6edb7
4 changed files with 11 additions and 11 deletions
|
|
@ -42,7 +42,7 @@ async function clickhouseQuery(
|
|||
filters: QueryFilters,
|
||||
): Promise<{ x: string; y: number }[]> {
|
||||
const { timezone = 'utc', unit = 'day' } = filters;
|
||||
const { parseFilters, rawQuery } = clickhouse;
|
||||
const { parseFilters, rawQuery, getDateSQL } = clickhouse;
|
||||
const { filterQuery, params } = await parseFilters(websiteId, {
|
||||
...filters,
|
||||
eventType: EVENT_TYPE.pageView,
|
||||
|
|
@ -57,7 +57,7 @@ async function clickhouseQuery(
|
|||
g.y as y
|
||||
from (
|
||||
select
|
||||
date_trunc('${unit}', created_at, '${timezone}') as t,
|
||||
${getDateSQL('website_event.created_at', unit, timezone)} as t,
|
||||
count(*) as y
|
||||
from website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
|
|
@ -75,7 +75,7 @@ async function clickhouseQuery(
|
|||
g.y as y
|
||||
from (
|
||||
select
|
||||
date_trunc('${unit}', created_at, '${timezone}') as t,
|
||||
${getDateSQL('website_event.created_at', unit, timezone)} as t,
|
||||
sum(views)as y
|
||||
from website_event_stats_hourly website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue