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
c8a4b1ac
Commit
c8a4b1ac
authored
Mar 26, 2020
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass current_user to the footer component
parent
9876141b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
...pts/pages/projects/security/vulnerabilities/show/index.js
+4
-4
ee/app/helpers/vulnerabilities_helper.rb
ee/app/helpers/vulnerabilities_helper.rb
+3
-1
ee/app/views/projects/security/vulnerabilities/show.html.haml
...pp/views/projects/security/vulnerabilities/show.html.haml
+1
-1
No files found.
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
View file @
c8a4b1ac
...
...
@@ -11,8 +11,8 @@ function createFooterApp() {
const
{
vulnerabilityFeedbackHelpPath
,
hasMr
}
=
el
.
dataset
;
const
vulnerability
=
JSON
.
parse
(
el
.
dataset
.
vulnerabilityJson
);
const
finding
=
JSON
.
parse
(
el
.
dataset
.
finding
);
const
remediation
=
finding
.
remediations
[
0
]
;
const
finding
=
JSON
.
parse
(
el
.
dataset
.
finding
Json
);
const
remediation
=
finding
.
solution
;
const
hasDownload
=
Boolean
(
vulnerability
.
state
!==
'
resolved
'
&&
remediation
?.
diff
?.
length
&&
!
hasMr
,
);
...
...
@@ -20,14 +20,14 @@ function createFooterApp() {
const
props
=
{
solutionInfo
:
{
solution
:
finding
.
solution
,
remediation
,
remediation
:
finding
.
solution
,
hasDownload
,
hasMr
,
hasRemediation
:
Boolean
(
remediation
),
vulnerabilityFeedbackHelpPath
,
isStandaloneVulnerability
:
true
,
},
feedback
:
finding
.
issue_
feedback
,
feedback
:
finding
.
feedback
,
project
:
{
url
:
finding
.
project
.
full_path
,
value
:
finding
.
project
.
full_name
,
...
...
ee/app/helpers/vulnerabilities_helper.rb
View file @
c8a4b1ac
...
...
@@ -35,7 +35,9 @@ module VulnerabilitiesHelper
links:
occurrence
[
:links
],
location:
occurrence
[
:location
],
name:
occurrence
[
:name
],
solution:
remediation
?
remediation
[
'summary'
]
:
occurrence
[
:solution
]
solution:
remediation
?
remediation
[
'summary'
]
:
occurrence
[
:solution
],
feedback:
occurrence
[
:issue_feedback
],
project:
occurrence
[
:project
]
}
end
end
ee/app/views/projects/security/vulnerabilities/show.html.haml
View file @
c8a4b1ac
...
...
@@ -38,4 +38,4 @@
%li
%a
{
:href
=>
identifier
.
url
,
target:
"_blank"
,
rel:
'noopener noreferrer'
}=
identifier
.
name
#js-vulnerability-footer
{
data:
vulnerability_data
(
@vulnerability
,
@pipeline
)
}
#js-vulnerability-footer
{
data:
vulnerability_data
(
@vulnerability
,
@pipeline
,
current_user:
@current_user
)
}
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