1+ import { formatDuration , nanosecondsToMilliseconds } from "@trigger.dev/core/v3" ;
12import { ExitIcon } from "~/assets/icons/ExitIcon" ;
23import { CodeBlock } from "~/components/code/CodeBlock" ;
34import { Button } from "~/components/primitives/Buttons" ;
45import { DateTimeAccurate } from "~/components/primitives/DateTime" ;
56import { Header2 } from "~/components/primitives/Headers" ;
67import * as Property from "~/components/primitives/PropertyTable" ;
8+ import { Spinner } from "~/components/primitives/Spinner" ;
79import { TabButton , TabContainer } from "~/components/primitives/Tabs" ;
810import { TextLink } from "~/components/primitives/TextLink" ;
911import { InfoIconTooltip , SimpleTooltip } from "~/components/primitives/Tooltip" ;
@@ -15,13 +17,10 @@ import { useOrganization } from "~/hooks/useOrganizations";
1517import { useProject } from "~/hooks/useProject" ;
1618import { useSearchParams } from "~/hooks/useSearchParam" ;
1719import { cn } from "~/utils/cn" ;
18- import { v3RunPath , v3RunsPath , v3TraceSpanPath } from "~/utils/pathBuilder" ;
20+ import { v3RunsPath } from "~/utils/pathBuilder" ;
1921import { TraceSpan } from "~/utils/taskEvent" ;
20- import { SpanLink } from "~/v3/eventRepository.server" ;
2122import { RunTimelineEvent , RunTimelineLine } from "./InspectorTimeline" ;
22- import { Spinner } from "~/components/primitives/Spinner" ;
2323import { LiveTimer } from "./LiveTimer" ;
24- import { formatDuration , nanosecondsToMilliseconds } from "@trigger.dev/core/v3" ;
2524
2625export function SpanInspector ( {
2726 span,
@@ -150,18 +149,6 @@ export function SpanInspector({
150149 ) }
151150 </ Property . Value >
152151 </ Property . Item >
153- { span . links && span . links . length > 0 && (
154- < Property . Item >
155- < Property . Label > Links</ Property . Label >
156- < Property . Value >
157- < div className = "space-y-1" >
158- { span . links . map ( ( link , index ) => (
159- < SpanLinkElement key = { index } link = { link } />
160- ) ) }
161- </ div >
162- </ Property . Value >
163- </ Property . Item >
164- ) }
165152 </ Property . Table >
166153 </ div >
167154 ) : (
@@ -203,18 +190,6 @@ export function SpanInspector({
203190 < Property . Label > Message</ Property . Label >
204191 < Property . Value > { span . message } </ Property . Value >
205192 </ Property . Item >
206- { span . links && span . links . length > 0 && (
207- < Property . Item >
208- < Property . Label > Links</ Property . Label >
209- < Property . Value >
210- < div className = "space-y-1" >
211- { span . links . map ( ( link , index ) => (
212- < SpanLinkElement key = { index } link = { link } />
213- ) ) }
214- </ div >
215- </ Property . Value >
216- </ Property . Item >
217- ) }
218193 </ Property . Table >
219194
220195 { span . events !== undefined && < SpanEvents spanEvents = { span . events } /> }
@@ -287,27 +262,3 @@ export function SpanTimeline({ startTime, duration, inProgress, isError }: Timel
287262 </ >
288263 ) ;
289264}
290-
291- function SpanLinkElement ( { link } : { link : SpanLink } ) {
292- const organization = useOrganization ( ) ;
293- const project = useProject ( ) ;
294-
295- switch ( link . type ) {
296- case "run" : {
297- return (
298- < TextLink to = { v3RunPath ( organization , project , { friendlyId : link . runId } ) } >
299- { link . title }
300- </ TextLink >
301- ) ;
302- }
303- case "span" : {
304- return (
305- < TextLink to = { v3TraceSpanPath ( organization , project , link . traceId , link . spanId ) } >
306- { link . title }
307- </ TextLink >
308- ) ;
309- }
310- }
311-
312- return null ;
313- }
0 commit comments