Commit b4f0e66c authored by Matija Čupić's avatar Matija Čupić

Add html response to #test_report

parent 3ca2042d
...@@ -156,14 +156,21 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -156,14 +156,21 @@ class Projects::PipelinesController < Projects::ApplicationController
def test_report def test_report
return unless Feature.enabled?(:junit_pipeline_view, project) return unless Feature.enabled?(:junit_pipeline_view, project)
if pipeline_test_report == :error respond_to do |format|
render json: { status: :error_parsing_report } format.html do
return render 'show'
end end
render json: TestReportSerializer format.json do
.new(current_user: @current_user) if pipeline_test_report == :error
.represent(pipeline_test_report) render json: { status: :error_parsing_report }
else
render json: TestReportSerializer
.new(current_user: @current_user)
.represent(pipeline_test_report)
end
end
end
end end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment