mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Fixed search. Updated queries to not use domain.
This commit is contained in:
parent
b4f04a8729
commit
1d15a88370
5 changed files with 8 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import MetricsTable, { MetricsTableProps } from '@/components/metrics/MetricsTable';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function BrowsersTable(props: MetricsTableProps) {
|
||||
export function ChannelsTable(props: MetricsTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
const renderLabel = ({ x }) => {
|
||||
|
|
@ -19,4 +19,4 @@ export function BrowsersTable(props: MetricsTableProps) {
|
|||
);
|
||||
}
|
||||
|
||||
export default BrowsersTable;
|
||||
export default ChannelsTable;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ function getFilterQuery(filters: QueryFilters = {}, options: QueryOptions = {})
|
|||
arr.push(`and ${mapFilter(column, operator, name)}`);
|
||||
|
||||
if (name === 'referrer') {
|
||||
arr.push('and referrer_domain != hostname');
|
||||
arr.push(`and referrer_domain != hostname`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,6 @@ async function parseFilters(websiteId: string, filters: QueryFilters = {}, optio
|
|||
...getFilterParams(filters),
|
||||
websiteId,
|
||||
startDate: maxDate(filters.startDate, new Date(website?.resetAt)),
|
||||
websiteDomain: website.domain,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -162,7 +161,7 @@ async function pagedQuery(
|
|||
|
||||
const statements = [
|
||||
orderBy && `order by ${orderBy} ${direction}`,
|
||||
+size > 0 && `limit ${+size} offset ${offset}`,
|
||||
+size > 0 && `limit ${+size} offset ${+offset}`,
|
||||
]
|
||||
.filter(n => n)
|
||||
.join('\n');
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ function getFilterQuery(filters: QueryFilters = {}, options: QueryOptions = {}):
|
|||
|
||||
if (name === 'referrer') {
|
||||
arr.push(
|
||||
'and (website_event.referrer_domain != {{websiteDomain}} or website_event.referrer_domain is null)',
|
||||
`and (website_event.referrer_domain != session.hostname or website_event.referrer_domain is null)`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -205,7 +205,6 @@ async function parseFilters(
|
|||
...getFilterParams(filters),
|
||||
websiteId,
|
||||
startDate: maxDate(filters.startDate, website?.resetAt),
|
||||
websiteDomain: website.domain,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const pagingParams = {
|
|||
page: z.coerce.number().int().positive().optional(),
|
||||
pageSize: z.coerce.number().int().positive().optional(),
|
||||
orderBy: z.string().optional(),
|
||||
query: z.string().optional(),
|
||||
search: z.string().optional(),
|
||||
};
|
||||
|
||||
export const timezoneParam = z.string().refine(value => isValidTimezone(value), {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ async function clickhouseQuery(
|
|||
let entryExitQuery = '';
|
||||
|
||||
if (column === 'referrer_domain') {
|
||||
excludeDomain = `and referrer_domain != {websiteDomain:String} and referrer_domain != ''`;
|
||||
excludeDomain = `and referrer_domain != hostname and referrer_domain != ''`;
|
||||
}
|
||||
|
||||
if (type === 'entry' || type === 'exit') {
|
||||
|
|
@ -139,7 +139,7 @@ async function clickhouseQuery(
|
|||
let groupByQuery = '';
|
||||
|
||||
if (column === 'referrer_domain') {
|
||||
excludeDomain = `and t != {websiteDomain:String} and t != ''`;
|
||||
excludeDomain = `and t != hostname`;
|
||||
}
|
||||
|
||||
let columnQuery = `arrayJoin(${column})`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue