mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Migrate to v2.10.2
This commit is contained in:
parent
17c93dab31
commit
3eae82632f
3 changed files with 6 additions and 3 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
import WebsiteDetails from './WebsiteDetails';
|
import WebsiteDetails from './WebsiteDetails';
|
||||||
import { Metadata } from 'next';
|
import { Metadata } from 'next';
|
||||||
|
|
||||||
export default function WebsitePage({ params: { websiteId } }) {
|
export default function WebsitePage({ params: { websiteId }, searchParams }) {
|
||||||
return <WebsiteDetails websiteId={websiteId} />;
|
return <WebsiteDetails customDataFields={searchParams['fields']?.split(',') ?? []} websiteId={websiteId} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ export interface MetricsTableProps extends ListTableProps {
|
||||||
onSearch?: (search: string) => void;
|
onSearch?: (search: string) => void;
|
||||||
allowSearch?: boolean;
|
allowSearch?: boolean;
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
|
fieldName?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function MetricsTable({
|
export function MetricsTable({
|
||||||
|
|
@ -41,6 +42,7 @@ export function MetricsTable({
|
||||||
delay = null,
|
delay = null,
|
||||||
allowSearch = false,
|
allowSearch = false,
|
||||||
children,
|
children,
|
||||||
|
fieldName,
|
||||||
...props
|
...props
|
||||||
}: MetricsTableProps) {
|
}: MetricsTableProps) {
|
||||||
const [search, setSearch] = useState('');
|
const [search, setSearch] = useState('');
|
||||||
|
|
@ -70,6 +72,7 @@ export function MetricsTable({
|
||||||
city,
|
city,
|
||||||
limit,
|
limit,
|
||||||
search,
|
search,
|
||||||
|
fieldName,
|
||||||
},
|
},
|
||||||
{ retryDelay: delay || DEFAULT_ANIMATION_DURATION, onDataLoad },
|
{ retryDelay: delay || DEFAULT_ANIMATION_DURATION, onDataLoad },
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ export default async (
|
||||||
|
|
||||||
return ok(res, data);
|
return ok(res, data);
|
||||||
} else if (type === 'custom') {
|
} else if (type === 'custom') {
|
||||||
const data = await getPageviewMetrics(websiteId, column, filters, limit, fieldName);
|
const data = await getPageviewMetrics(websiteId, column, filters, limit, offset, fieldName);
|
||||||
|
|
||||||
return ok(res, data);
|
return ok(res, data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue