import { Timeline, Text, Code, Collapse, Box, Group } from "@mantine/core"; import { IconCircleCheck, IconCircleX, IconLoader, IconCircleMinus, IconClock, } from "@tabler/icons-react"; import { useDisclosure } from "@mantine/hooks"; import type { DagStepResult } from "../types"; const iconMap: Record = { success: , failed: , running: , skipped: , pending: , }; function StepItem({ step }: { step: DagStepResult }) { const [opened, { toggle }] = useDisclosure(step.Status === "failed"); const hasOutput = step.Stdout || step.Stderr; return ( {step.StepName} {step.DurationMs}ms {step.ExitCode !== 0 && step.ExitCode !== -1 && ( exit {step.ExitCode} )} } > {hasOutput && ( {step.Stdout && ( {step.Stdout} )} {step.Stderr && ( {step.Stderr} )} )} ); } export function StepTimeline({ steps }: { steps: DagStepResult[] }) { const activeIndex = steps.findIndex((s) => s.Status === "running"); return ( = 0 ? activeIndex : steps.length - 1} bulletSize={24} > {steps.map((step) => ( ))} ); }