File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/main/java/io/jenkins/plugins/pipelinegraphview/consoleview Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -121,20 +121,23 @@ protected JSONObject getAllSteps() throws IOException {
121121 }
122122
123123 @ WebMethod (name = "log" )
124- public HttpResponse getConsoleText (StaplerRequest2 req , StaplerResponse2 rsp ) throws IOException {
124+ public void getConsoleText (StaplerRequest2 req , StaplerResponse2 rsp ) throws IOException {
125125 String nodeId = req .getParameter ("nodeId" );
126126 if (nodeId == null ) {
127127 logger .error ("'consoleText' was not passed 'nodeId'." );
128- return HttpResponses .errorJSON ("Error getting console text" );
128+ rsp .getWriter ().write ("Error getting console text" );
129+ return ;
129130 }
130131 logger .debug ("getConsoleText was passed node id '{}'." , nodeId );
131132 // This will be a step, so return its log output.
132133 AnnotatedLargeText <? extends FlowNode > logText = getLogForNode (nodeId );
133134
135+
134136 if (logText != null ) {
135- return HttpResponses .text (PipelineNodeUtil .convertLogToString (logText ));
137+ logText .writeLogTo (0L , rsp .getOutputStream ());
138+ return ;
136139 }
137- return HttpResponses . text ("No logs found" );
140+ rsp . getWriter (). write ("No logs found" );
138141 }
139142
140143 /*
You can’t perform that action at this time.
0 commit comments