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
8c8e5d50
Commit
8c8e5d50
authored
Sep 24, 2020
by
Savas Vedova
Committed by
Alexander Turinske
Oct 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve design for vulnerability details
- Update tests
parent
9ac5ac08
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
37 deletions
+46
-37
ee/app/assets/javascripts/vulnerabilities/components/detail_item.vue
...ts/javascripts/vulnerabilities/components/detail_item.vue
+1
-1
ee/app/assets/javascripts/vulnerabilities/components/details.vue
...assets/javascripts/vulnerabilities/components/details.vue
+43
-34
ee/spec/frontend/vulnerabilities/details_spec.js
ee/spec/frontend/vulnerabilities/details_spec.js
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+1
-1
No files found.
ee/app/assets/javascripts/vulnerabilities/components/detail_item.vue
View file @
8c8e5d50
...
...
@@ -16,7 +16,7 @@ export default {
</
script
>
<
template
>
<li
:data-testid=
"valueName"
>
<li
:data-testid=
"valueName"
class=
"gl-list-style-none gl-ml-0! gl-mb-4"
>
<gl-sprintf
:message=
"sprintfMessage"
>
<template
#label
="
{ content }">
<strong
data-testid=
"label"
>
{{
content
}}
</strong>
...
...
ee/app/assets/javascripts/vulnerabilities/components/details.vue
View file @
8c8e5d50
...
...
@@ -91,7 +91,12 @@ export default {
},
shouldShowLocation
()
{
return
(
this
.
location
.
crash_address
||
this
.
location
.
crash_type
||
this
.
location
.
stacktrace_snippet
this
.
location
.
crash_address
||
this
.
location
.
crash_type
||
this
.
location
.
stacktrace_snippet
||
this
.
location
.
file
||
this
.
location
.
image
||
this
.
location
.
operating_system
);
},
},
...
...
@@ -123,12 +128,7 @@ export default {
<detail-item
:sprintf-message=
"__('%
{labelStart}Severity:%{labelEnd} %{severity}')">
<severity-badge
:severity=
"vulnerability.severity"
class=
"gl-display-inline ml-1"
/>
</detail-item>
<detail-item
v-if=
"vulnerability.evidence"
:sprintf-message=
"__('%
{labelStart}Evidence:%{labelEnd} %{evidence}')"
>
{{
vulnerability
.
evidence
}}
</detail-item>
<detail-item
:sprintf-message=
"__('%
{labelStart}Report Type:%{labelEnd} %{reportType}')"
<detail-item
:sprintf-message=
"__('%
{labelStart}Scan Type:%{labelEnd} %{reportType}')"
>
{{
vulnerability
.
report_type
}}
</detail-item>
<detail-item
...
...
@@ -151,14 +151,20 @@ export default {
</component>
</detail-item>
<detail-item
v-if=
"location.
image
"
:sprintf-message=
"__('%{labelStart}
Image:%{labelEnd} %{image
}')"
>
{{ location.
image
}}
v-if=
"location.
class
"
:sprintf-message=
"__('%{labelStart}
Class:%{labelEnd} %{class
}')"
>
{{ location.
class
}}
</detail-item>
<detail-item
v-if=
"location.operating_system"
:sprintf-message=
"__('%{labelStart}Namespace:%{labelEnd} %{namespace}')"
>
{{ location.operating_system }}
v-if=
"location.method"
:sprintf-message=
"__('%{labelStart}Method:%{labelEnd} %{method}')"
>
<code>
{{ location.method }}
</code>
</detail-item>
<detail-item
v-if=
"vulnerability.evidence"
:sprintf-message=
"__('%{labelStart}Evidence:%{labelEnd} %{evidence}')"
>
{{ vulnerability.evidence }}
</detail-item>
</ul>
...
...
@@ -166,35 +172,31 @@ export default {
<h3>
{{
__
(
'
Location
'
)
}}
</h3>
<ul>
<detail-item
v-if=
"location.
crash_address
"
:sprintf-message=
"__('%
{labelStart}
Crash Address:%{labelEnd} %{crash_address
}')"
>
{{
location
.
crash_address
}}
v-if=
"location.
image
"
:sprintf-message=
"__('%
{labelStart}
Image:%{labelEnd} %{image
}')"
>
{{
location
.
image
}}
</detail-item>
<detail-item
v-if=
"location.stacktrace_snippet"
:sprintf-message=
"__('%
{labelStart}Crash State:%{labelEnd} %{stacktrace_snippet}')"
>
<code-block
:code=
"location.stacktrace_snippet"
max-height=
"225px"
/>
v-if=
"location.operating_system"
:sprintf-message=
"__('%
{labelStart}Namespace:%{labelEnd} %{namespace}')"
>
{{
location
.
operating_system
}}
</detail-item>
</ul>
</
template
>
<
template
v-if=
"location.file"
>
<h3>
{{
__
(
'
Location
'
)
}}
</h3>
<ul>
<detail-item
:sprintf-message=
"__('%
{labelStart}File:%{labelEnd} %{file}')">
<detail-item
v-if=
"location.file"
:sprintf-message=
"__('%
{labelStart}File:%{labelEnd} %{file}')"
>
<gl-link
:href=
"fileUrl"
target=
"_blank"
>
{{
fileText
}}
</gl-link>
</detail-item>
<detail-item
v-if=
"location.c
la
ss"
:sprintf-message=
"__('%
{labelStart}C
lass:%{labelEnd} %{cla
ss}')"
>
{{
location
.
c
la
ss
}}
v-if=
"location.c
rash_addre
ss"
:sprintf-message=
"__('%
{labelStart}C
rash Address:%{labelEnd} %{crash_addre
ss}')"
>
{{
location
.
c
rash_addre
ss
}}
</detail-item>
<detail-item
v-if=
"location.
method
"
:sprintf-message=
"__('%
{labelStart}
Method:%{labelEnd} %{method
}')"
v-if=
"location.
stacktrace_snippet
"
:sprintf-message=
"__('%
{labelStart}
Crash State:%{labelEnd} %{stacktrace_snippet
}')"
>
<code
>
{{
location
.
method
}}
</code
>
<code
-block
:code=
"location.stacktrace_snippet"
max-height=
"225px"
/
>
</detail-item>
</ul>
</
template
>
...
...
@@ -202,7 +204,12 @@ export default {
<
template
v-if=
"vulnerability.links && vulnerability.links.length"
>
<h3>
{{
__
(
'
Links
'
)
}}
</h3>
<ul>
<li
v-for=
"(link, index) in vulnerability.links"
:key=
"`$
{index}:${link.url}`">
<li
v-for=
"(link, index) in vulnerability.links"
:key=
"`$
{index}:${link.url}`"
style="list-style-position: inside;"
class="gl-ml-0! gl-list-style-position-inside"
>
<gl-link
:href=
"link.url"
data-testid=
"link"
...
...
@@ -222,6 +229,8 @@ export default {
<li
v-for=
"(identifier, index) in vulnerability.identifiers"
:key=
"`$
{index}:${identifier.url}`"
style="list-style-position: inside;"
class="gl-ml-0! gl-list-style-position-inside"
>
<gl-link
:href=
"identifier.url"
data-testid=
"identifier"
target=
"_blank"
>
{{
identifier
.
name
}}
...
...
ee/spec/frontend/vulnerabilities/details_spec.js
View file @
8c8e5d50
...
...
@@ -36,7 +36,7 @@ describe('Vulnerability Details', () => {
expect
(
getText
(
'
title
'
)).
toBe
(
vulnerability
.
title
);
expect
(
getText
(
'
description
'
)).
toBe
(
vulnerability
.
description
);
expect
(
wrapper
.
find
(
SeverityBadge
).
props
(
'
severity
'
)).
toBe
(
vulnerability
.
severity
);
expect
(
getText
(
'
reportType
'
)).
toBe
(
`
Report
Type:
${
vulnerability
.
report_type
}
`
);
expect
(
getText
(
'
reportType
'
)).
toBe
(
`
Scan
Type:
${
vulnerability
.
report_type
}
`
);
expect
(
getById
(
'
image
'
).
exists
()).
toBe
(
false
);
expect
(
getById
(
'
os
'
).
exists
()).
toBe
(
false
);
...
...
locale/gitlab.pot
View file @
8c8e5d50
...
...
@@ -537,7 +537,7 @@ msgstr ""
msgid "%{labelStart}Namespace:%{labelEnd} %{namespace}"
msgstr ""
msgid "%{labelStart}
Report
Type:%{labelEnd} %{reportType}"
msgid "%{labelStart}
Scan
Type:%{labelEnd} %{reportType}"
msgstr ""
msgid "%{labelStart}Scanner:%{labelEnd} %{scanner}"
...
...
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