Commit 8ef7d99e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add seucity report tab to pipeline page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5db0e1f0
class Projects::PipelinesController < Projects::ApplicationController
before_action :whitelist_query_limiting, only: [:create, :retry]
before_action :pipeline, except: [:index, :new, :create, :charts]
before_action :commit, only: [:show, :builds, :failures]
before_action :commit, only: [:show, :builds, :failures, :security]
before_action :authorize_read_pipeline!
before_action :authorize_create_pipeline!, only: [:new, :create]
before_action :authorize_update_pipeline!, only: [:retry, :cancel]
......@@ -83,7 +83,11 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def builds
render_show
if @pipeline.sast_artifact
render_show
else
redirect_to pipeline_path(@pipeline)
end
end
def failures
......
- failed_builds = @pipeline.statuses.latest.failed
- sast_artifact = @pipeline.sast_artifact
.tabs-holder
%ul.pipelines-tabs.nav-links.no-top.no-bottom.mobile-separator
......@@ -14,7 +15,7 @@
= 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
- if 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
......@@ -57,3 +58,6 @@
%span.build-name
= link_to build.name, pipeline_job_url(pipeline, build)
%pre.build-log= build_summary(build, skip: index >= 10)
- if sast_artifact
#js-tab-security.build-security.tab-pane
%h1 PUT SECURITY REPORT HERE
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