in step_instance.go [89:120]
func (si *StepInstance[T]) DotSpec() *graph.DotNodeSpec {
shape := "hexagon"
if si.Definition.stepType == stepTypeRoot {
shape = "triangle"
}
color := "gray"
switch si.state {
case StepStatePending:
color = "gray"
case StepStateRunning:
color = "yellow"
case StepStateCompleted:
color = "green"
case StepStateFailed:
color = "red"
}
tooltip := ""
if si.state != StepStatePending && si.executionData != nil {
tooltip = fmt.Sprintf("State: %s\\nStartAt: %s\\nDuration: %s", si.state, si.executionData.StartTime.Format(time.RFC3339Nano), si.executionData.Duration)
}
return &graph.DotNodeSpec{
Name: si.GetName(),
DisplayName: si.GetName(),
Shape: shape,
Style: "filled",
FillColor: color,
Tooltip: tooltip,
}
}