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
f157d3a4
Commit
f157d3a4
authored
Aug 17, 2021
by
David Pisek
Committed by
Ezekiel Kigbo
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vuln Details: Fix names of scanner and tool labels
parent
bb2352cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
...ipts/vulnerabilities/components/vulnerability_details.vue
+2
-2
ee/spec/frontend/vulnerabilities/vulnerability_details_spec.js
...ec/frontend/vulnerabilities/vulnerability_details_spec.js
+7
-7
locale/gitlab.pot
locale/gitlab.pot
+2
-2
No files found.
ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue
View file @
f157d3a4
...
@@ -200,12 +200,12 @@ export default {
...
@@ -200,12 +200,12 @@ export default {
<detail-item
:sprintf-message=
"__('%
{labelStart}Severity:%{labelEnd} %{severity}')">
<detail-item
:sprintf-message=
"__('%
{labelStart}Severity:%{labelEnd} %{severity}')">
<severity-badge
:severity=
"vulnerability.severity"
class=
"gl-display-inline ml-1"
/>
<severity-badge
:severity=
"vulnerability.severity"
class=
"gl-display-inline ml-1"
/>
</detail-item>
</detail-item>
<detail-item
:sprintf-message=
"__('%
{labelStart}
Scan Type
:%{labelEnd} %{reportType}')">
{{
<detail-item
:sprintf-message=
"__('%
{labelStart}
Tool
:%{labelEnd} %{reportType}')">
{{
humanReadableReportType
humanReadableReportType
}}
</detail-item>
}}
</detail-item>
<detail-item
<detail-item
v-if=
"scanner.name"
v-if=
"scanner.name"
:sprintf-message=
"__('%
{labelStart}
Tool
:%{labelEnd} %{scanner}')"
:sprintf-message=
"__('%
{labelStart}
Scanner
:%{labelEnd} %{scanner}')"
>
>
<component
<component
:is=
"scannerDetails.component"
:is=
"scannerDetails.component"
...
...
ee/spec/frontend/vulnerabilities/vulnerability_details_spec.js
View file @
f157d3a4
...
@@ -35,7 +35,7 @@ describe('Vulnerability Details', () => {
...
@@ -35,7 +35,7 @@ describe('Vulnerability Details', () => {
createWrapper
();
createWrapper
();
expect
(
getText
(
'
description
'
)).
toBe
(
vulnerability
.
description
);
expect
(
getText
(
'
description
'
)).
toBe
(
vulnerability
.
description
);
expect
(
wrapper
.
find
(
SeverityBadge
).
props
(
'
severity
'
)).
toBe
(
vulnerability
.
severity
);
expect
(
wrapper
.
find
(
SeverityBadge
).
props
(
'
severity
'
)).
toBe
(
vulnerability
.
severity
);
expect
(
getText
(
'
reportType
'
)).
toBe
(
`
Scan Type
:
${
vulnerability
.
reportType
}
`
);
expect
(
getText
(
'
reportType
'
)).
toBe
(
`
Tool
:
${
vulnerability
.
reportType
}
`
);
expect
(
getById
(
'
title
'
).
exists
()).
toBe
(
false
);
expect
(
getById
(
'
title
'
).
exists
()).
toBe
(
false
);
expect
(
getById
(
'
image
'
).
exists
()).
toBe
(
false
);
expect
(
getById
(
'
image
'
).
exists
()).
toBe
(
false
);
...
@@ -63,7 +63,7 @@ describe('Vulnerability Details', () => {
...
@@ -63,7 +63,7 @@ describe('Vulnerability Details', () => {
'
displays "$expectedOutput" when report type is "$reportType"
'
,
'
displays "$expectedOutput" when report type is "$reportType"
'
,
({
reportType
,
expectedOutput
})
=>
{
({
reportType
,
expectedOutput
})
=>
{
createWrapper
({
reportType
});
createWrapper
({
reportType
});
expect
(
getText
(
'
reportType
'
)).
toBe
(
`
Scan Type
:
${
expectedOutput
}
`
);
expect
(
getText
(
'
reportType
'
)).
toBe
(
`
Tool
:
${
expectedOutput
}
`
);
},
},
);
);
...
@@ -222,26 +222,26 @@ describe('Vulnerability Details', () => {
...
@@ -222,26 +222,26 @@ describe('Vulnerability Details', () => {
const
scannerText
=
()
=>
getById
(
'
scanner
'
).
text
();
const
scannerText
=
()
=>
getById
(
'
scanner
'
).
text
();
it
(
'
shows the scanner name only but no link
'
,
()
=>
{
it
(
'
shows the scanner name only but no link
'
,
()
=>
{
createWrapper
({
scanner
:
{
name
:
'
some
tool
'
}
});
createWrapper
({
scanner
:
{
name
:
'
some
scanner
'
}
});
expect
(
scannerText
()).
toBe
(
'
Tool: some tool
'
);
expect
(
scannerText
()).
toBe
(
'
Scanner: some scanner
'
);
expect
(
link
().
element
instanceof
HTMLSpanElement
).
toBe
(
true
);
expect
(
link
().
element
instanceof
HTMLSpanElement
).
toBe
(
true
);
});
});
it
(
'
shows the scanner name and version but no link
'
,
()
=>
{
it
(
'
shows the scanner name and version but no link
'
,
()
=>
{
createWrapper
({
scanner
:
{
name
:
'
some scanner
'
,
version
:
'
1.2.3
'
}
});
createWrapper
({
scanner
:
{
name
:
'
some scanner
'
,
version
:
'
1.2.3
'
}
});
expect
(
scannerText
()).
toBe
(
'
Tool
: some scanner (version 1.2.3)
'
);
expect
(
scannerText
()).
toBe
(
'
Scanner
: some scanner (version 1.2.3)
'
);
expect
(
link
().
element
instanceof
HTMLSpanElement
).
toBe
(
true
);
expect
(
link
().
element
instanceof
HTMLSpanElement
).
toBe
(
true
);
});
});
it
(
'
shows the scanner name only with a link
'
,
()
=>
{
it
(
'
shows the scanner name only with a link
'
,
()
=>
{
createWrapper
({
scanner
:
{
name
:
'
some tool
'
,
url
:
'
//link
'
}
});
createWrapper
({
scanner
:
{
name
:
'
some tool
'
,
url
:
'
//link
'
}
});
expect
(
scannerText
()).
toBe
(
'
Tool
: some tool
'
);
expect
(
scannerText
()).
toBe
(
'
Scanner
: some tool
'
);
expect
(
link
().
attributes
(
'
href
'
)).
toBe
(
'
//link
'
);
expect
(
link
().
attributes
(
'
href
'
)).
toBe
(
'
//link
'
);
});
});
it
(
'
shows the scanner name and version with a link
'
,
()
=>
{
it
(
'
shows the scanner name and version with a link
'
,
()
=>
{
createWrapper
({
scanner
:
{
name
:
'
some tool
'
,
version
:
'
1.2.3
'
,
url
:
'
//link
'
}
});
createWrapper
({
scanner
:
{
name
:
'
some tool
'
,
version
:
'
1.2.3
'
,
url
:
'
//link
'
}
});
expect
(
scannerText
()).
toBe
(
'
Tool
: some tool (version 1.2.3)
'
);
expect
(
scannerText
()).
toBe
(
'
Scanner
: some tool (version 1.2.3)
'
);
expect
(
link
().
attributes
(
'
href
'
)).
toBe
(
'
//link
'
);
expect
(
link
().
attributes
(
'
href
'
)).
toBe
(
'
//link
'
);
});
});
});
});
...
...
locale/gitlab.pot
View file @
f157d3a4
...
@@ -660,7 +660,7 @@ msgstr ""
...
@@ -660,7 +660,7 @@ msgstr ""
msgid "%{labelStart}Namespace:%{labelEnd} %{namespace}"
msgid "%{labelStart}Namespace:%{labelEnd} %{namespace}"
msgstr ""
msgstr ""
msgid "%{labelStart}Scan
Type:%{labelEnd} %{reportType
}"
msgid "%{labelStart}Scan
ner:%{labelEnd} %{scanner
}"
msgstr ""
msgstr ""
msgid "%{labelStart}Sent request:%{labelEnd} %{headers}"
msgid "%{labelStart}Sent request:%{labelEnd} %{headers}"
...
@@ -669,7 +669,7 @@ msgstr ""
...
@@ -669,7 +669,7 @@ msgstr ""
msgid "%{labelStart}Severity:%{labelEnd} %{severity}"
msgid "%{labelStart}Severity:%{labelEnd} %{severity}"
msgstr ""
msgstr ""
msgid "%{labelStart}Tool:%{labelEnd} %{
scanner
}"
msgid "%{labelStart}Tool:%{labelEnd} %{
reportType
}"
msgstr ""
msgstr ""
msgid "%{labelStart}Unmodified response:%{labelEnd} %{headers}"
msgid "%{labelStart}Unmodified response:%{labelEnd} %{headers}"
...
...
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