Merge dev.

This commit is contained in:
Mike Cao
2025-04-28 20:09:58 -07:00
88 changed files with 4120 additions and 21010 deletions

View File

@@ -1,12 +1,28 @@
import { MetricsTable, MetricsTableProps } from './MetricsTable';
import { useMessages } from '@/components/hooks';
export function EventsTable(props: MetricsTableProps) {
export interface EventsTableProps extends MetricsTableProps {
onLabelClick?: (value: string) => void;
}
export function EventsTable({ onLabelClick, ...props }: EventsTableProps) {
const { formatMessage, labels } = useMessages();
function handleDataLoad(data: any) {
const handleDataLoad = (data: any) => {
props.onDataLoad?.(data);
}
};
const renderLabel = ({ x: label }) => {
if (onLabelClick) {
return (
<div onClick={() => onLabelClick(label)} style={{ cursor: 'pointer' }}>
{label}
</div>
);
}
return label;
};
return (
<MetricsTable
@@ -15,6 +31,7 @@ export function EventsTable(props: MetricsTableProps) {
type="event"
metric={formatMessage(labels.actions)}
onDataLoad={handleDataLoad}
renderLabel={renderLabel}
/>
);
}