Skip to content

Commit 5f1f92d

Browse files
committed
Update the right endpoint
1 parent 7e90165 commit 5f1f92d

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/main/java/io/jenkins/plugins/pipelinegraphview/consoleview/PipelineConsoleViewAction.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.HashMap;
2222
import java.util.List;
2323
import net.sf.json.JSONObject;
24+
import org.jenkinsci.plugins.workflow.actions.LogAction;
2425
import org.jenkinsci.plugins.workflow.flow.FlowExecution;
2526
import org.jenkinsci.plugins.workflow.graph.FlowNode;
2627
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
@@ -130,26 +131,6 @@ public HttpResponse getConsoleText(StaplerRequest2 req, StaplerResponse2 rsp) th
130131
// This will be a step, so return its log output.
131132
AnnotatedLargeText<? extends FlowNode> logText = getLogForNode(nodeId);
132133

133-
long count = 0;
134-
PipelineStepList steps = stepApi.getSteps(nodeId);
135-
try (CharSpool spool = new CharSpool()) {
136-
137-
for (PipelineStep step : steps.getSteps()) {
138-
AnnotatedLargeText<? extends FlowNode> logForNode = getLogForNode(String.valueOf(step.getId()));
139-
if (logForNode != null) {
140-
count += logForNode.writeLogTo(0, spool);
141-
}
142-
}
143-
144-
if (count > 0) {
145-
rsp.setContentType("text/plain;charset=UTF-8");
146-
try (Writer writer = rsp.getWriter()) {
147-
spool.flush();
148-
spool.writeTo(new LineEndNormalizingWriter(writer));
149-
}
150-
}
151-
}
152-
153134
if (logText != null) {
154135
return HttpResponses.text(PipelineNodeUtil.convertLogToString(logText));
155136
}

0 commit comments

Comments
 (0)