mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Made filters work for all reports.
This commit is contained in:
parent
ea83afbc13
commit
8b64029409
46 changed files with 328 additions and 275 deletions
|
|
@ -121,11 +121,12 @@ async function clickhouseQuery(
|
|||
}[]
|
||||
> {
|
||||
const { windowMinutes, startDate, endDate, steps } = criteria;
|
||||
const { rawQuery } = clickhouse;
|
||||
const { rawQuery, parseFilters } = clickhouse;
|
||||
const { levelOneQuery, levelQuery, sumQuery, stepFilterQuery, params } = getFunnelQuery(
|
||||
steps,
|
||||
windowMinutes,
|
||||
);
|
||||
const { filterQuery, filterParams: filterParams } = await parseFilters(websiteId, criteria);
|
||||
|
||||
function getFunnelQuery(
|
||||
steps: { type: string; value: string }[],
|
||||
|
|
@ -200,6 +201,7 @@ async function clickhouseQuery(
|
|||
where (${stepFilterQuery})
|
||||
and website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
${filterQuery}
|
||||
),
|
||||
${levelOneQuery}
|
||||
${levelQuery}
|
||||
|
|
@ -213,6 +215,7 @@ async function clickhouseQuery(
|
|||
startDate,
|
||||
endDate,
|
||||
...params,
|
||||
...filterParams,
|
||||
},
|
||||
).then(formatResults(steps));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue