Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8ef7d99e
Commit
8ef7d99e
authored
Feb 14, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add seucity report tab to pipeline page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
5db0e1f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+6
-2
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+5
-1
No files found.
app/controllers/projects/pipelines_controller.rb
View file @
8ef7d99e
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
...
...
app/views/projects/pipelines/_with_tabs.html.haml
View file @
8ef7d99e
-
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment