mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
fix filter params
This commit is contained in:
parent
95d824542f
commit
7e112b8469
6 changed files with 11 additions and 5 deletions
|
|
@ -70,7 +70,7 @@ function getFilterQuery(filters = {}, params = []): string {
|
|||
|
||||
if (filter !== undefined) {
|
||||
const column = FILTER_COLUMNS[key] || key;
|
||||
arr.push(`and ${column}=$${params.length + 1}`);
|
||||
arr.push(`and ${column}={{${key}}}`);
|
||||
params.push(decodeURIComponent(filter));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ async function relationalQuery(websiteId: string, criteria: GetEventMetricsCrite
|
|||
order by 2
|
||||
`,
|
||||
{
|
||||
...filters,
|
||||
websiteId,
|
||||
startDate: maxDate(startDate, website.resetAt),
|
||||
endDate,
|
||||
eventType: EVENT_TYPE.customEvent,
|
||||
...filters,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ async function relationalQuery(
|
|||
startDate: maxDate(startDate, website.resetAt),
|
||||
endDate,
|
||||
eventType: column === 'event_name' ? EVENT_TYPE.customEvent : EVENT_TYPE.pageView,
|
||||
...filters,
|
||||
};
|
||||
|
||||
let excludeDomain = '';
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ async function relationalQuery(websiteId: string, criteria: PageviewStatsCriteri
|
|||
group by 1
|
||||
`,
|
||||
{
|
||||
...filters,
|
||||
websiteId,
|
||||
startDate: maxDate(startDate, website.resetAt),
|
||||
endDate,
|
||||
eventType: EVENT_TYPE.pageView,
|
||||
...filters,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,12 @@ async function relationalQuery(
|
|||
group by 1
|
||||
order by 2 desc
|
||||
limit 100`,
|
||||
{ ...filters, websiteId, startDate: maxDate(startDate, website.resetAt), endDate },
|
||||
{
|
||||
websiteId,
|
||||
startDate: maxDate(startDate, website.resetAt),
|
||||
endDate,
|
||||
...filters,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ async function relationalQuery(
|
|||
) as t
|
||||
`,
|
||||
{
|
||||
...filters,
|
||||
websiteId,
|
||||
startDate: maxDate(startDate, website.resetAt),
|
||||
endDate,
|
||||
eventType: EVENT_TYPE.pageView,
|
||||
...filters,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue