func connectStepInstance()

in step_instance.go [122:144]


func connectStepInstance(stepFrom, stepTo StepInstanceMeta) *graph.DotEdgeSpec {
	edgeSpec := &graph.DotEdgeSpec{
		FromNodeName: stepFrom.GetName(),
		ToNodeName:   stepTo.GetName(),
		Color:        "black",
		Style:        "bold",
	}

	// update edge color, tooltip if NodeTo is started already.
	if stepTo.GetState() != StepStatePending {
		executionData := stepTo.ExecutionData()
		edgeSpec.Tooltip = fmt.Sprintf("Time: %s", executionData.StartTime.Format(time.RFC3339Nano))
	}

	fromNodeState := stepFrom.GetState()
	if fromNodeState == StepStateCompleted {
		edgeSpec.Color = "green"
	} else if fromNodeState == StepStateFailed {
		edgeSpec.Color = "red"
	}

	return edgeSpec
}