Commit 5db0e1f0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add route and UI tab for pipeline security report view

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7afd29db
......@@ -94,6 +94,14 @@ class Projects::PipelinesController < Projects::ApplicationController
end
end
def security
if @pipeline.sast_artifact
render_show
else
redirect_to pipeline_path(@pipeline)
end
end
def status
render json: PipelineSerializer
.new(project: @project, current_user: @current_user)
......
......@@ -14,6 +14,10 @@
= link_to failures_project_pipeline_path(@project, @pipeline), data: {target: 'div#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do
Failed Jobs
%span.badge.js-failures-counter= failed_builds.count
- if pipeline.sast_artifact
%li.js-security-tab-link
= link_to security_project_pipeline_path(@project, @pipeline), data: {target: 'div#js-tab-security', action: 'security', toggle: 'tab' }, class: 'security-tab' do
Security Report
.tab-content
#js-tab-pipeline.tab-pane
......
......@@ -212,6 +212,7 @@ constraints(ProjectUrlConstrainer.new) do
get :builds
get :failures
get :status
get :security
end
end
......
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