mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 12:29:35 +01:00
fix host filtering
This commit is contained in:
parent
cda3ba345b
commit
3f477c5d50
@ -8,7 +8,7 @@ export function useFilterParams(websiteId: string) {
|
||||
const { startDate, endDate, unit } = dateRange;
|
||||
const { timezone } = useTimezone();
|
||||
const {
|
||||
query: { url, referrer, title, query, os, browser, device, country, region, city, event },
|
||||
query: { url, referrer, title, query, host, os, browser, device, country, region, city, event },
|
||||
} = useNavigation();
|
||||
|
||||
return {
|
||||
@ -20,6 +20,7 @@ export function useFilterParams(websiteId: string) {
|
||||
referrer,
|
||||
title,
|
||||
query,
|
||||
host,
|
||||
os,
|
||||
browser,
|
||||
device,
|
||||
|
@ -33,7 +33,7 @@ export const FILTER_REFERRERS = 'filter-referrers';
|
||||
export const FILTER_PAGES = 'filter-pages';
|
||||
|
||||
export const UNIT_TYPES = ['year', 'month', 'hour', 'day', 'minute'];
|
||||
export const EVENT_COLUMNS = ['url', 'entry', 'exit', 'referrer', 'title', 'query', 'event', 'host'];
|
||||
export const EVENT_COLUMNS = ['url', 'entry', 'exit', 'referrer', 'title', 'query', 'event'];
|
||||
|
||||
export const SESSION_COLUMNS = [
|
||||
'browser',
|
||||
|
@ -181,6 +181,7 @@ export interface QueryFilters {
|
||||
referrer?: string;
|
||||
title?: string;
|
||||
query?: string;
|
||||
host?: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { canViewWebsite } from 'lib/auth';
|
||||
import { useAuth, useCors, useValidate } from 'lib/middleware';
|
||||
import { getRequestFilters, getRequestDateRange } from 'lib/request';
|
||||
import { getRequestDateRange, getRequestFilters } from 'lib/request';
|
||||
import { NextApiRequestQueryBody, WebsiteMetric } from 'lib/types';
|
||||
import { TimezoneTest, UnitTypeTest } from 'lib/yup';
|
||||
import { NextApiResponse } from 'next';
|
||||
@ -17,6 +17,7 @@ export interface WebsiteEventsRequestQuery {
|
||||
url: string;
|
||||
referrer?: string;
|
||||
title?: string;
|
||||
host?: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
@ -35,6 +36,7 @@ const schema = {
|
||||
url: yup.string(),
|
||||
referrer: yup.string(),
|
||||
title: yup.string(),
|
||||
host: yup.string(),
|
||||
os: yup.string(),
|
||||
browser: yup.string(),
|
||||
device: yup.string(),
|
||||
|
@ -17,6 +17,7 @@ export interface WebsiteMetricsRequestQuery {
|
||||
referrer?: string;
|
||||
title?: string;
|
||||
query?: string;
|
||||
host?: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
@ -40,6 +41,7 @@ const schema = {
|
||||
referrer: yup.string(),
|
||||
title: yup.string(),
|
||||
query: yup.string(),
|
||||
host: yup.string(),
|
||||
os: yup.string(),
|
||||
browser: yup.string(),
|
||||
device: yup.string(),
|
||||
|
@ -17,8 +17,8 @@ export interface WebsitePageviewRequestQuery {
|
||||
timezone?: string;
|
||||
url?: string;
|
||||
referrer?: string;
|
||||
host?: string;
|
||||
title?: string;
|
||||
host?: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
@ -37,8 +37,8 @@ const schema = {
|
||||
timezone: TimezoneTest,
|
||||
url: yup.string(),
|
||||
referrer: yup.string(),
|
||||
host: yup.string(),
|
||||
title: yup.string(),
|
||||
host: yup.string(),
|
||||
os: yup.string(),
|
||||
browser: yup.string(),
|
||||
device: yup.string(),
|
||||
|
@ -14,10 +14,10 @@ export interface WebsiteStatsRequestQuery {
|
||||
endAt: number;
|
||||
url?: string;
|
||||
referrer?: string;
|
||||
host?: string;
|
||||
title?: string;
|
||||
query?: string;
|
||||
event?: string;
|
||||
host?: string;
|
||||
os?: string;
|
||||
browser?: string;
|
||||
device?: string;
|
||||
@ -34,10 +34,10 @@ const schema = {
|
||||
endAt: yup.number().required(),
|
||||
url: yup.string(),
|
||||
referrer: yup.string(),
|
||||
host: yup.string(),
|
||||
title: yup.string(),
|
||||
query: yup.string(),
|
||||
event: yup.string(),
|
||||
host: yup.string(),
|
||||
os: yup.string(),
|
||||
browser: yup.string(),
|
||||
device: yup.string(),
|
||||
|
Loading…
Reference in New Issue
Block a user