mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +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
|
|
@ -108,7 +108,7 @@ async function relationalQuery(
|
|||
sequenceQuery,
|
||||
startStepQuery,
|
||||
endStepQuery,
|
||||
params,
|
||||
filterParams: params,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ async function clickhouseQuery(
|
|||
},
|
||||
): Promise<JourneyResult[]> {
|
||||
const { startDate, endDate, steps, startStep, endStep } = filters;
|
||||
const { rawQuery } = clickhouse;
|
||||
const { rawQuery, parseFilters } = clickhouse;
|
||||
const { sequenceQuery, startStepQuery, endStepQuery, params } = getJourneyQuery(
|
||||
steps,
|
||||
startStep,
|
||||
|
|
@ -218,10 +218,12 @@ async function clickhouseQuery(
|
|||
sequenceQuery,
|
||||
startStepQuery,
|
||||
endStepQuery,
|
||||
params,
|
||||
filterParams: params,
|
||||
};
|
||||
}
|
||||
|
||||
const { filterQuery, filterParams: filterParams } = await parseFilters(websiteId, filters);
|
||||
|
||||
return rawQuery(
|
||||
`
|
||||
WITH events AS (
|
||||
|
|
@ -231,6 +233,7 @@ async function clickhouseQuery(
|
|||
row_number() OVER (PARTITION BY visit_id ORDER BY created_at) AS event_number
|
||||
from umami.website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
${filterQuery}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}),
|
||||
${sequenceQuery}
|
||||
select *
|
||||
|
|
@ -246,6 +249,7 @@ async function clickhouseQuery(
|
|||
startDate,
|
||||
endDate,
|
||||
...params,
|
||||
...filterParams,
|
||||
},
|
||||
).then(parseResult);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue