mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
New compare page.
This commit is contained in:
parent
08f9adaddf
commit
3f167e05ba
17 changed files with 151 additions and 127 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useMemo } from 'react';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
import { Icon, Row, Text } from '@umami/react-zen';
|
||||
import { LinkButton } from '@/components/common/LinkButton';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
|
|
@ -15,6 +15,7 @@ export interface MetricsTableProps extends ListTableProps {
|
|||
limit?: number;
|
||||
showMore?: boolean;
|
||||
params?: Record<string, any>;
|
||||
onDataLoad?: (data: any) => void;
|
||||
}
|
||||
|
||||
export function MetricsTable({
|
||||
|
|
@ -24,6 +25,7 @@ export function MetricsTable({
|
|||
limit,
|
||||
showMore = false,
|
||||
params,
|
||||
onDataLoad,
|
||||
...props
|
||||
}: MetricsTableProps) {
|
||||
const { updateParams } = useNavigation();
|
||||
|
|
@ -55,6 +57,12 @@ export function MetricsTable({
|
|||
return [];
|
||||
}, [data, dataFilter, limit, type]);
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
onDataLoad?.(data);
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
const renderLabel = (row: any) => {
|
||||
return <MetricLabel type={type} data={row} />;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue