From 053d5b4bd5afa0b0d03913730ed422cf6566f816 Mon Sep 17 00:00:00 2001 From: "Wei-Chun, Chang" Date: Mon, 23 Dec 2024 16:11:52 +0800 Subject: [PATCH] Incloud node name in preview change event Signed-off-by: Wei-Chun, Chang --- js/src/components/lineage/NodeView.tsx | 2 +- js/src/components/lineage/PreviewChangeView.tsx | 2 +- js/src/lib/api/track.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/src/components/lineage/NodeView.tsx b/js/src/components/lineage/NodeView.tsx index 8ee340a8..ccb34887 100644 --- a/js/src/components/lineage/NodeView.tsx +++ b/js/src/components/lineage/NodeView.tsx @@ -149,7 +149,7 @@ export function NodeView({ node, onCloseNode }: NodeViewProps) { icon={} onClick={() => { onPreviewChangeOpen(); - trackPreviewChange({ action: "explore" }); + trackPreviewChange({ action: "explore", node: node.name }); }} > Preview Change (Experiment) diff --git a/js/src/components/lineage/PreviewChangeView.tsx b/js/src/components/lineage/PreviewChangeView.tsx index 3cade108..5b0ea926 100644 --- a/js/src/components/lineage/PreviewChangeView.tsx +++ b/js/src/components/lineage/PreviewChangeView.tsx @@ -85,7 +85,7 @@ function PreviewChangeTopBar({ onClick={() => { onRunResultOpen(); runQuery(); - trackPreviewChange({ action: "run" }); + trackPreviewChange({ action: "run", node: current?.name }); }} colorScheme="blue" isLoading={isPending} diff --git a/js/src/lib/api/track.ts b/js/src/lib/api/track.ts index 727761be..a1cd7a88 100644 --- a/js/src/lib/api/track.ts +++ b/js/src/lib/api/track.ts @@ -42,6 +42,7 @@ export function trackHistoryAction(props: HistoryActionProps) { interface PreviewChangeProps { action: "explore" | "run"; + node?: string; } export function trackPreviewChange(props: PreviewChangeProps) {