diff --git a/frontend/src/lib/components/assets/AssetGraph/AssetGraphDetailsPane.svelte b/frontend/src/lib/components/assets/AssetGraph/AssetGraphDetailsPane.svelte index 7c6676ccbc..4ad3b30792 100644 --- a/frontend/src/lib/components/assets/AssetGraph/AssetGraphDetailsPane.svelte +++ b/frontend/src/lib/components/assets/AssetGraph/AssetGraphDetailsPane.svelte @@ -21,10 +21,16 @@ Trash2, X, Pencil, - ChevronDown + ChevronDown, + Zap } from 'lucide-svelte' import DropdownV2 from '$lib/components/DropdownV2.svelte' - import { upstreamScriptItems, type UpstreamScript } from './upstreamScriptItems' + import { + upstreamScriptItems, + upstreamTriggerItems, + type UpstreamScript, + type UpstreamTriggerAction + } from './upstreamScriptItems' import { inferArgs } from '$lib/infer' import { emptySchema, sendUserToast } from '$lib/utils' import type { Schema } from '$lib/common' @@ -164,6 +170,8 @@ * which calls `onEditScript` with the one picked. */ producerScripts?: UpstreamScript[] onEditScript?: (path: string) => void + /** The selected asset's upstream triggers that can be opened from here. */ + producerTriggers?: UpstreamTriggerAction[] // Pipeline-wide column-lineage graph (built by the parent page from the // resolved graph). Drives the transitive column-lineage trace shown for a // selected materialized asset. @@ -314,6 +322,7 @@ selectionProducers = [], producerScripts = [], onEditScript, + producerTriggers = [], selectionColumnGraph, selectionColumnLoading = false, selectionColumnTruncated = false, @@ -1059,6 +1068,36 @@ {/snippet} {/if} + {#if selection?.kind === 'asset' && producerTriggers.length === 1} + + {:else if selection?.kind === 'asset' && producerTriggers.length > 1} + + {#snippet buttonReplacement()} + + {/snippet} + + {/if} {#if readOnly && onRequestEdit}