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
7a77698f
Commit
7a77698f
authored
Jun 18, 2020
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use {issue,merge_request}_feedback in footer
parent
71ec3c49
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
20 deletions
+27
-20
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
...pts/pages/projects/security/vulnerabilities/show/index.js
+4
-2
ee/app/assets/javascripts/vulnerabilities/components/footer.vue
.../assets/javascripts/vulnerabilities/components/footer.vue
+15
-5
ee/spec/frontend/vulnerabilities/footer_spec.js
ee/spec/frontend/vulnerabilities/footer_spec.js
+8
-13
No files found.
ee/app/assets/javascripts/pages/projects/security/vulnerabilities/show/index.js
View file @
7a77698f
...
...
@@ -43,7 +43,8 @@ function createFooterApp() {
hasMr
,
discussionsUrl
,
state
,
issueFeedback
:
feedback
,
issueFeedback
,
mergeRequestFeedback
,
notesUrl
,
project
,
remediations
,
...
...
@@ -68,7 +69,8 @@ function createFooterApp() {
vulnerabilityFeedbackHelpPath
,
isStandaloneVulnerability
:
true
,
},
feedback
,
issueFeedback
,
mergeRequestFeedback
,
project
:
{
url
:
project
.
full_path
,
value
:
project
.
full_name
,
...
...
ee/app/assets/javascripts/vulnerabilities/components/footer.vue
View file @
7a77698f
...
...
@@ -30,6 +30,16 @@ export default {
type
:
Object
,
required
:
true
,
},
issueFeedback
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
null
,
},
mergeRequestFeedback
:
{
type
:
Object
,
required
:
false
,
default
:
()
=>
null
,
},
},
data
:
()
=>
({
...
...
@@ -150,16 +160,16 @@ export default {
<div
data-qa-selector=
"vulnerability_footer"
>
<solution-card
v-if=
"hasSolution"
v-bind=
"solutionInfo"
/>
<div
v-if=
"
project.issue_feedback || project.merge_request_f
eedback"
class=
"card"
>
<div
v-if=
"
issueFeedback || mergeRequestF
eedback"
class=
"card"
>
<issue-note
v-if=
"
project.issue_f
eedback"
:feedback=
"
project.issue_f
eedback"
v-if=
"
issueF
eedback"
:feedback=
"
issueF
eedback"
:project=
"project"
class=
"card-body"
/>
<merge-request-note
v-if=
"
project.merge_request_f
eedback"
:feedback=
"
project.merge_request_f
eedback"
v-if=
"
mergeRequestF
eedback"
:feedback=
"
mergeRequestF
eedback"
:project=
"project"
class=
"card-body"
/>
...
...
ee/spec/frontend/vulnerabilities/footer_spec.js
View file @
7a77698f
...
...
@@ -29,11 +29,10 @@ describe('Vulnerability Footer', () => {
},
finding
:
{},
notesUrl
:
'
/notes
'
,
};
const
project
=
{
project
:
{
full_path
:
'
/root/security-reports
'
,
full_name
:
'
Administrator / Security Reports
'
,
},
};
const
solutionInfoProp
=
{
...
...
@@ -82,21 +81,17 @@ describe('Vulnerability Footer', () => {
describe
.
each
`
type | prop | component
${
'
issue
'
}
|
${
'
issue
_feedback
'
}
|
${
IssueNote
}
${
'
merge request
'
}
|
${
'
merge
_request_f
eedback
'
}
|
${
MergeRequestNote
}
${
'
issue
'
}
|
${
'
issue
Feedback
'
}
|
${
IssueNote
}
${
'
merge request
'
}
|
${
'
merge
RequestF
eedback
'
}
|
${
MergeRequestNote
}
`
(
'
$type note
'
,
({
prop
,
component
})
=>
{
// The object itself does not matter, we just want to make sure it's passed to the issue note.
const
feedback
=
{};
it
(
'
shows issue note when an issue exists for the vulnerability
'
,
()
=>
{
createWrapper
({
...
minimumProps
,
finding
:
{
project
,
[
prop
]:
feedback
}
});
createWrapper
({
...
minimumProps
,
[
prop
]:
feedback
});
expect
(
wrapper
.
contains
(
component
)).
toBe
(
true
);
expect
(
wrapper
.
find
(
component
).
props
()).
toMatchObject
({
feedback
,
project
:
{
url
:
project
.
full_path
,
value
:
project
.
full_name
,
},
});
});
...
...
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