55import edu .umd .cs .findbugs .annotations .Nullable ;
66import hudson .model .Action ;
77import hudson .model .Result ;
8+ import hudson .model .Run ;
89import io .jenkins .plugins .pipelinegraphview .Messages ;
910import io .jenkins .plugins .pipelinegraphview .analysis .TimingInfo ;
1011import io .jenkins .plugins .pipelinegraphview .steps .HideFromViewStep ;
@@ -88,6 +89,7 @@ public enum NodeType {
8889 public final NodeType type ;
8990 private final String displayName ;
9091 private final InputStep inputStep ;
92+ private final Run <?, ?> downstreamBuildRun ;
9193 private final WorkflowRun run ;
9294 private String causeOfFailure ;
9395
@@ -101,7 +103,7 @@ public FlowNodeWrapper(
101103 @ NonNull NodeRunStatus status ,
102104 @ NonNull TimingInfo timingInfo ,
103105 @ NonNull WorkflowRun run ) {
104- this (node , status , timingInfo , null , run , null );
106+ this (node , status , timingInfo , null , null , run , null );
105107 }
106108
107109 public FlowNodeWrapper (
@@ -110,7 +112,17 @@ public FlowNodeWrapper(
110112 @ NonNull TimingInfo timingInfo ,
111113 @ Nullable InputStep inputStep ,
112114 @ NonNull WorkflowRun run ) {
113- this (node , status , timingInfo , inputStep , run , null );
115+ this (node , status , timingInfo , inputStep , null , run , null );
116+ }
117+
118+ public FlowNodeWrapper (
119+ @ NonNull FlowNode node ,
120+ @ NonNull NodeRunStatus status ,
121+ @ NonNull TimingInfo timingInfo ,
122+ @ Nullable InputStep inputStep ,
123+ @ Nullable Run <?, ?> downstreamBuildRun ,
124+ @ NonNull WorkflowRun run ) {
125+ this (node , status , timingInfo , inputStep , downstreamBuildRun , run , null );
114126 }
115127
116128 public FlowNodeWrapper (
@@ -120,12 +132,24 @@ public FlowNodeWrapper(
120132 @ Nullable InputStep inputStep ,
121133 @ NonNull WorkflowRun run ,
122134 @ Nullable NodeType type ) {
135+ this (node , status , timingInfo , inputStep , null , run , type );
136+ }
137+
138+ public FlowNodeWrapper (
139+ @ NonNull FlowNode node ,
140+ @ NonNull NodeRunStatus status ,
141+ @ NonNull TimingInfo timingInfo ,
142+ @ Nullable InputStep inputStep ,
143+ @ Nullable Run <?, ?> downstreamBuildRun ,
144+ @ NonNull WorkflowRun run ,
145+ @ Nullable NodeType type ) {
123146 this .node = node ;
124147 this .status = status ;
125148 this .timingInfo = timingInfo ;
126149 this .type = type == null ? getNodeType (node ) : type ;
127150 this .displayName = PipelineNodeUtil .getDisplayName (node );
128151 this .inputStep = inputStep ;
152+ this .downstreamBuildRun = downstreamBuildRun ;
129153 this .run = run ;
130154 }
131155
@@ -293,6 +317,10 @@ public boolean equals(Object obj) {
293317 return inputStep ;
294318 }
295319
320+ public @ CheckForNull Run <?, ?> getDownstreamBuildRun () {
321+ return downstreamBuildRun ;
322+ }
323+
296324 @ Override
297325 public int hashCode () {
298326 return node .hashCode ();
0 commit comments