mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fixed funnel query. Allow wildcard search for events.
This commit is contained in:
parent
ffd27ab202
commit
32d5edd67e
@ -76,12 +76,9 @@ async function relationalQuery(
|
|||||||
let operator = '=';
|
let operator = '=';
|
||||||
let paramValue = cv.value;
|
let paramValue = cv.value;
|
||||||
|
|
||||||
if (isURL && cv.value.includes('*')) {
|
if (cv.value.includes('*')) {
|
||||||
operator = '~';
|
|
||||||
paramValue = cv.value.replace(/\*/g, '.*');
|
|
||||||
} else if (isURL && cv.value.endsWith('*')) {
|
|
||||||
operator = 'like';
|
operator = 'like';
|
||||||
paramValue = cv.value.replace('*', '%');
|
paramValue = cv.value.replaceAll('*', '%');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (levelNumber === 1) {
|
if (levelNumber === 1) {
|
||||||
@ -177,25 +174,15 @@ async function clickhouseQuery(
|
|||||||
const levelNumber = i + 1;
|
const levelNumber = i + 1;
|
||||||
const startSum = i > 0 ? 'union all ' : '';
|
const startSum = i > 0 ? 'union all ' : '';
|
||||||
const startFilter = i > 0 ? 'or' : '';
|
const startFilter = i > 0 ? 'or' : '';
|
||||||
const column = cv.type === 'url' ? 'url_path' : 'event_name';
|
const isURL = cv.type === 'url';
|
||||||
|
const column = isURL ? 'url_path' : 'event_name';
|
||||||
|
|
||||||
let operator: string;
|
let operator = '=';
|
||||||
let paramValue: string;
|
let paramValue = cv.value;
|
||||||
|
|
||||||
if (cv.type === 'url') {
|
|
||||||
if (cv.value.includes('*')) {
|
if (cv.value.includes('*')) {
|
||||||
operator = 'match';
|
|
||||||
paramValue = cv.value.replace(/\*/g, '.*');
|
|
||||||
} else if (cv.value.endsWith('*')) {
|
|
||||||
operator = 'like';
|
operator = 'like';
|
||||||
paramValue = cv.value.replace('*', '%');
|
paramValue = cv.value.replaceAll('*', '%');
|
||||||
} else {
|
|
||||||
operator = '=';
|
|
||||||
paramValue = cv.value;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
operator = '=';
|
|
||||||
paramValue = cv.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (levelNumber === 1) {
|
if (levelNumber === 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user