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
125f2bb2
Commit
125f2bb2
authored
Feb 20, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inconsistencies between text report
parent
16697943
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
app/assets/javascripts/pipelines/components/security_reports/sast_report_summary_widget.vue
...omponents/security_reports/sast_report_summary_widget.vue
+3
-1
spec/javascripts/pipelines/security_reports/sast_report_summary_widget_spec.js
...lines/security_reports/sast_report_summary_widget_spec.js
+1
-1
No files found.
app/assets/javascripts/pipelines/components/security_reports/sast_report_summary_widget.vue
View file @
125f2bb2
...
@@ -20,10 +20,11 @@
...
@@ -20,10 +20,11 @@
},
},
computed
:
{
computed
:
{
summarySastText
()
{
summarySastText
()
{
const
text
=
s__
(
'
ciReport|SAST detected %{link}
'
)
;
let
text
;
let
link
;
let
link
;
if
(
this
.
unresolvedIssues
.
length
)
{
if
(
this
.
unresolvedIssues
.
length
)
{
text
=
s__
(
'
ciReport|SAST degraded on %{link}
'
);
link
=
this
.
unresolvedIssues
.
length
>
1
?
link
=
this
.
unresolvedIssues
.
length
>
1
?
this
.
getLink
(
sprintf
(
this
.
getLink
(
sprintf
(
s__
(
'
ciReport|%{d} security vulnerabilities
'
),
s__
(
'
ciReport|%{d} security vulnerabilities
'
),
...
@@ -32,6 +33,7 @@
...
@@ -32,6 +33,7 @@
))
:
))
:
this
.
getLink
(
s__
(
'
ciReport|1 security vulnerability
'
));
this
.
getLink
(
s__
(
'
ciReport|1 security vulnerability
'
));
}
else
{
}
else
{
text
=
s__
(
'
ciReport|SAST detected %{link}
'
);
link
=
this
.
getLink
(
s__
(
'
ciReport|no security vulnerabilities
'
));
link
=
this
.
getLink
(
s__
(
'
ciReport|no security vulnerabilities
'
));
}
}
...
...
spec/javascripts/pipelines/security_reports/sast_report_summary_widget_spec.js
View file @
125f2bb2
...
@@ -24,7 +24,7 @@ describe('SAST report summary widget', () => {
...
@@ -24,7 +24,7 @@ describe('SAST report summary widget', () => {
});
});
it
(
'
renders summary text with link for the security tab
'
,
()
=>
{
it
(
'
renders summary text with link for the security tab
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
SAST de
tected
2 security vulnerabilities
'
);
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
SAST de
graded on
2 security vulnerabilities
'
);
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
group/project/pipelines/2/security
'
);
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
group/project/pipelines/2/security
'
);
});
});
});
});
...
...
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