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
e6d6c46b
Commit
e6d6c46b
authored
Sep 28, 2020
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add localization, move code to helper, add test
parent
6aef7178
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
ee/app/helpers/ee/gitlab_routing_helper.rb
ee/app/helpers/ee/gitlab_routing_helper.rb
+4
-0
ee/app/views/vulnerabilities/issue_description.md.erb
ee/app/views/vulnerabilities/issue_description.md.erb
+1
-1
ee/spec/helpers/ee/gitlab_routing_helper_spec.rb
ee/spec/helpers/ee/gitlab_routing_helper_spec.rb
+10
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-2
No files found.
ee/app/helpers/ee/gitlab_routing_helper.rb
View file @
e6d6c46b
...
...
@@ -38,6 +38,10 @@ module EE
project_security_vulnerability_path
(
entity
.
project
,
entity
,
*
args
)
end
def
vulnerability_url
(
vulnerability
)
::
Gitlab
::
UrlBuilder
.
build
(
vulnerability
)
end
def
project_vulnerability_path
(
project
,
vulnerability
,
*
args
)
project_security_vulnerability_path
(
project
,
vulnerability
,
*
args
)
end
...
...
ee/app/views/vulnerabilities/issue_description.md.erb
View file @
e6d6c46b
<%
if
vulnerability
.
is_a?
Vulnerability
%>
Issue created from vulnerability
<%=
link_to
vulnerability
.
id
,
Gitlab
::
UrlBuilder
.
build
(
vulnerability
)
%>
<%=
_
(
"Issue created from vulnerability"
)
%>
<%=
link_to
vulnerability
.
id
,
vulnerability_url
(
vulnerability
)
%>
<%
end
%>
###
<%=
_
(
"Description"
)
%>
:
...
...
ee/spec/helpers/ee/gitlab_routing_helper_spec.rb
View file @
e6d6c46b
...
...
@@ -142,4 +142,14 @@ RSpec.describe EE::GitlabRoutingHelper do
end
end
end
describe
'#vulnerability_url'
do
let_it_be
(
:vulnerability
)
{
create
(
:vulnerability
)
}
subject
{
vulnerability_url
(
vulnerability
)
}
it
'returns the full url of the vulnerability'
do
expect
(
subject
).
to
eq
"http://localhost/
#{
vulnerability
.
project
.
namespace
.
path
}
/
#{
vulnerability
.
project
.
name
}
/-/security/vulnerabilities/
#{
vulnerability
.
id
}
"
end
end
end
locale/gitlab.pot
View file @
e6d6c46b
...
...
@@ -8,8 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-22 19:32+0200\n"
"PO-Revision-Date: 2020-09-22 19:32+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
...
...
@@ -14045,6 +14043,9 @@ msgstr ""
msgid "Issue cannot be found."
msgstr ""
msgid "Issue created from vulnerability"
msgstr ""
msgid "Issue events"
msgstr ""
...
...
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